title: Issue Connection to HBase with Spark Shell in CDH5.1
body: <p>I currently have a fresh image of CDH 5.1 for virtual box and I am running into an issue when trying to connect to HBase using spark shell.  Here is the scala code:</p>
  
  <pre><code>import org.apache.hadoop.hbase.HBaseConfiguration
  import org.apache.hadoop.hbase.client.{HBaseAdmin,HTable,Put,Get}
  import org.apache.hadoop.hbase.util.Bytes
  val conf = new HBaseConfiguration()
  val admin = new HBaseAdmin(conf)
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>java.io.IOException: java.lang.reflect.InvocationTargetException
      at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:416)
      at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:393)
      at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:274)
      at org.apache.hadoop.hbase.client.HBaseAdmin.&lt;init&gt;(HBaseAdmin.java:192)
  .
  .
  .
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:414)
      ... 43 more
  Caused by: java.lang.NoClassDefFoundError: org/cloudera/htrace/Trace
      at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:195)
      at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:479)
      at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
      at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:83)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.retrieveClusterId(HConnectionManager.java:857)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.&lt;init&gt;(HConnectionManager.java:662)
      ... 48 more
  Caused by: java.lang.ClassNotFoundException: org.cloudera.htrace.Trace
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 54 more
  </code></pre>