title: HBase Java API HTrace error
body: <p>I want to create a Java API to access HBase DB, but I am always facing with this error in my project;</p>
  
  <pre><code>15/12/14 20:34:22 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.34.184:2181,192.168.34.173:2181 sessionTimeout=90000 watcher=hconnection-0xa80e050x0, quorum=192.168.34.184:2181,192.168.34.173:2181, baseZNode=/hbase
  15/12/14 20:34:22 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.34.184:2181
  java.io.IOException: java.lang.reflect.InvocationTargetException
      at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
      at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:420)
      at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:413)
      at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:291)
      at org.apache.hadoop.hbase.client.HBaseAdmin.&lt;init&gt;(HBaseAdmin.java:222)
      at api.ClientOperations.creatTable(ClientOperations.java:69)
      at api.ClientOperations.main(ClientOperations.java:125)
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
      ... 6 more
  Caused by: java.lang.NoClassDefFoundError: org/apache/htrace/Trace
      at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:217)
      at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:541)
      at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
      at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
      at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:879)
      at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.&lt;init&gt;(ConnectionManager.java:635)
      ... 11 more
  Caused by: java.lang.ClassNotFoundException: org.apache.htrace.Trace
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
  </code></pre>
  
  <p>But I added HTrace jar in my project</p>
  
  <p><a href="https://i.stack.imgur.com/jcEw7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jcEw7.png" alt="Referenced libraries"></a></p>
  
  <p>HBase version: 1.1.2</p>
  
  <p>Hadoop version: 2.6.0</p>