Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:00:14+00:00 2026-06-04T16:00:14+00:00

I am new to hbase trying to make it work with java . i

  • 0

I am new to hbase trying to make it work with java . i tried the following code it gives an exception please help.

package com.bee.searchlib.test;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.MasterNotRunningException;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;

public class Test {

    public static void main(String args[]) throws Exception {

        Configuration config = HBaseConfiguration.create();
        HBaseAdmin admin = null;
        try {
            // HBaseAdmin is where all the "DDL" like operations take place in
            // HBase
            admin = new HBaseAdmin(config);
        } catch (MasterNotRunningException e) {
            throw new Exception(
                    "Could not setup HBaseAdmin as no master is running, did you start HBase?...");
        }

        if (!admin.tableExists("testTable")) {
            admin.createTable(new HTableDescriptor("testTable"));

            // disable so we can make changes to it
            admin.disableTable("testTable");

            // lets add 2 columns
            admin.addColumn("testTable", new HColumnDescriptor("firstName"));
            admin.addColumn("testTable", new HColumnDescriptor("lastName"));

            // enable the table for use
            admin.enableTable("testTable");

        }

        // get the table so we can use it in the next set of examples
        HTable table = new HTable(config, "testTable");
    }
}

excepion:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/configuration/Configuration
    at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<init>(DefaultMetricsSystem.java:37)
    at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<clinit>(DefaultMetricsSystem.java:34)
    at org.apache.hadoop.security.UgiInstrumentation.create(UgiInstrumentation.java:51)
    at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:209)
    at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:177)
    at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:229)
    at org.apache.hadoop.security.KerberosName.<clinit>(KerberosName.java:83)
    at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:202)
    at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:177)
    at org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupInformation.java:229)
    at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:428)
    at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:414)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.hbase.util.Methods.call(Methods.java:37)
    at org.apache.hadoop.hbase.security.User.call(User.java:586)
    at org.apache.hadoop.hbase.security.User.callStatic(User.java:576)
    at org.apache.hadoop.hbase.security.User.access$400(User.java:50)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:393)
    at org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:388)
    at org.apache.hadoop.hbase.security.User.getCurrent(User.java:139)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.<init>(HConnectionManager.java:412)
    at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:182)
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:98)
    at com.bee.searchlib.test.Test.main(Test.java:20)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 27 more

Libraries in build path
hadoop-core-1.0.0.jar
hbase-0.92.1.jar
log4j-1.2.16.jar
commons-logging-1.1.1.jar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:00:15+00:00Added an answer on June 4, 2026 at 4:00 pm

    Add the commons-configuration-x.x.jar to your build path. You can find it under $HADOOP_HOME/lib. Worked for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am new to HBASE i am trying to load a data into HBASE
New to R, and am trying to install the text mining package (tm). However
New to java... Trying to get a sample app to run. I'm including the
New to all this so forgive my ignorance. I am trying to figure out
New to LINQ.. I am curious as to the syntax to do the following
I'm playing around with an install of HBase cluster, and am trying to access
new to java and brand new to the site. I have a JLabel added
I'm almost completely new to HBase. I would like to take my current site
My situation is the following: I have a 20-node Hadoop/HBase cluster with 3 ZooKeepers.
I am relatively new to columnar database, please forgive ignorance. Lets say I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.