title: Hbase exception org/apache/commons/configuration/Configuration not found
body: <p>I am new to hbase trying to make it work with java . i tried the following code it gives an exception please help.</p>
  
  <pre><code>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");
      }
  }
  </code></pre>
  
  <p>excepion:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/configuration/Configuration
      at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.&lt;init&gt;(DefaultMetricsSystem.java:37)
      at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.&lt;clinit&gt;(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.&lt;clinit&gt;(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.&lt;init&gt;(User.java:393)
      at org.apache.hadoop.hbase.security.User$SecureHadoopUser.&lt;init&gt;(User.java:388)
      at org.apache.hadoop.hbase.security.User.getCurrent(User.java:139)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.&lt;init&gt;(HConnectionManager.java:412)
      at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:182)
      at org.apache.hadoop.hbase.client.HBaseAdmin.&lt;init&gt;(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
  </code></pre>
  
  <p>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</p>