<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29367#M6447</link>
    <description>&lt;P&gt;You need to &lt;STRONG&gt;always&lt;/STRONG&gt; provide your own dependencies for your application. There is no dependency on HBase in Spark and the fact that &lt;EM&gt;some&lt;/EM&gt; of the HBase jars are pulled in due to being part of a Hive dependency which Spark has is a coincidence.&lt;/P&gt;&lt;P&gt;If you build an application then you should always make sure that you resolve your own dependencies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might have worked in previous versions or in a distribution from a different provider out of the box becuase the Spark version had different dependencies.&lt;/P&gt;&lt;P&gt;BTW: you should be using the spark.[driver|executor].extraClassPath settings as that is the current way to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wilfred&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2015 07:43:16 GMT</pubDate>
    <dc:creator>Wilfred</dc:creator>
    <dc:date>2015-07-08T07:43:16Z</dc:date>
    <item>
      <title>ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29200#M6444</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Doing a simple test of hbase on CDH5.4.1: &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Added the required jars just in case to figure out why trace is missing.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;spark-shell --master yarn-client --jars /opt/cloudera/parcels/CDH/jars/hive-hbase-handler-1.1.0-cdh5.4.2.jar,/opt/cloudera/parcels/CDH/jars/hbase-server-1.0.0-cdh5.4.2.jar,/opt/cloudera/parcels/CDH/jars/hbase-protocol-1.0.0-cdh5.4.2.jar,/opt/cloudera/parcels/CDH/jars/hbase-hadoop2-compat-1.0.0-cdh5.4.2.jar,/opt/cloudera/parcels/CDH/jars/hbase-common-1.0.0-cdh5.4.2.jar,/opt/cloudera/parcels/CDH/jars/htrace-core-3.1.0-incubating.jar&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;When spark starts up. &amp;nbsp;The jars load:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/jars/hive-hbase-handler-1.1.0-cdh5.4.2.jar at &lt;A href="http://192.166.1.145:46366/jars/hive-hbase-handler-1.1.0-cdh5.4.2.jar" target="_blank"&gt;http://192.166.1.145:46366/jars/hive-hbase-handler-1.1.0-cdh5.4.2.jar&lt;/A&gt; with timestamp 1435825258057&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/jars/hbase-server-1.0.0-cdh5.4.2.jar at &lt;A href="http://192.166.1.145:46366/jars/hbase-server-1.0.0-cdh5.4.2.jar" target="_blank"&gt;http://192.166.1.145:46366/jars/hbase-server-1.0.0-cdh5.4.2.jar&lt;/A&gt; with timestamp 1435825258076&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/jars/hbase-protocol-1.0.0-cdh5.4.2.jar at &lt;A href="http://192.166.1.145:46366/jars/hbase-protocol-1.0.0-cdh5.4.2.jar" target="_blank"&gt;http://192.166.1.145:46366/jars/hbase-protocol-1.0.0-cdh5.4.2.jar&lt;/A&gt; with timestamp 1435825258095&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/jars/hbase-hadoop2-compat-1.0.0-cdh5.4.2.jar at &lt;A href="http://192.166.1.145:46366/jars/hbase-hadoop2-compat-1.0.0-cdh5.4.2.jar" target="_blank"&gt;http://192.166.1.145:46366/jars/hbase-hadoop2-compat-1.0.0-cdh5.4.2.jar&lt;/A&gt; with timestamp 1435825258096&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/jars/hbase-common-1.0.0-cdh5.4.2.jar at &lt;A href="http://192.166.1.145:46366/jars/hbase-common-1.0.0-cdh5.4.2.jar" target="_blank"&gt;http://192.166.1.145:46366/jars/hbase-common-1.0.0-cdh5.4.2.jar&lt;/A&gt; with timestamp 1435825258099&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;15/07/02 01:20:58 INFO SparkContext: Added JAR file:/opt/cloudera/parcels/CDH/lib/hbase/lib/&lt;STRONG&gt;htrace-core.jar&lt;/STRONG&gt; at &lt;A href="http://192.166.1.145:46366/jars/htrace-core." target="_blank"&gt;http://192.166.1.145:46366/jars/htrace-core.&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Running the following scala code with HBaseAdmin object:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.spark._&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.spark.rdd.NewHadoopRDD&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.{HBaseConfiguration, HTableDescriptor}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.client.HBaseAdmin&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.mapreduce.TableInputFormat&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.fs.Path;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.HColumnDescriptor&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.util.Bytes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.client.Put;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;import org.apache.hadoop.hbase.client.HTable;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;val conf = HBaseConfiguration.create()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;conf.addResource(new Path("/etc/hbase/conf/core-site.xml"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;conf.addResource(new Path("/etc/hbase/conf/hbase-site.xml"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;val admin = new HBaseAdmin(conf)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;java.io.IOException: java.lang.reflect.InvocationTargetException&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:414)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:407)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:285)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.HBaseAdmin.&amp;lt;init&amp;gt;(HBaseAdmin.java:207)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:33)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:38)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:40)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:42)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:44)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:46)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:48)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:50)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:52)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:54)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at &amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:56)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:60)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:7)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at $print(&amp;lt;console&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:1065)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1338)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:840)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:871)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:819)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:856)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:901)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:813)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.processLine$1(SparkILoop.scala:656)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:664)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$loop(SparkILoop.scala:669)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply$mcZ$sp(SparkILoop.scala:996)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:944)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:944)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$process(SparkILoop.scala:944)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1058)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.Main$.main(Main.scala:31)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.repl.Main.main(Main.scala)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:569)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:166)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:189)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:110)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Caused by: java.lang.reflect.InvocationTargetException&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at java.lang.reflect.Constructor.newInstance(Constructor.java:526)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;... 52 more&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;Caused by: java.lang.NoClassDefFoundError: org/apache/htrace/Trace&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:218)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:481)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:86)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:850)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.&amp;lt;init&amp;gt;(ConnectionManager.java:635)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;... 57 more&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Caused by: java.lang.ClassNotFoundException: org.apache.htrace.Trace&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also refered this post&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Apache-Hadoop-Concepts-and/Class-not-found-running-Spark-sample-hbase-importformat-py-in/td-p/27084" target="_blank"&gt;http://community.cloudera.com/t5/Apache-Hadoop-Concepts-and/Class-not-found-running-Spark-sample-hbase-importformat-py-in/td-p/27084&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that configuration change didnt make a difference either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:33:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29200#M6444</guid>
      <dc:creator>micbster</dc:creator>
      <dc:date>2022-09-16T09:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29244#M6445</link>
      <description>&lt;P&gt;I was able to run something similar on MapR cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did some digging around and i valided the issue with running the example HBaseTest on cloudera versus MapR.&amp;nbsp; I also noticed that Cloudera 5.4.1 is using HBase 1 versus 0.98. HBase.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There some significant client api changes in HBase.&amp;nbsp; Not sure if htis is the reason.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2015 03:08:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29244#M6445</guid>
      <dc:creator>micbster</dc:creator>
      <dc:date>2015-07-04T03:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29253#M6446</link>
      <description>&lt;P&gt;The spark-env.sh&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the end of this script you find:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Set distribution classpath. This is only used in CDH 5.3 and later.&lt;BR /&gt;export SPARK_DIST_CLASSPATH=$(paste -sd: "$SELF/classpath.txt")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I opened up the classpath.txt and&amp;nbsp;just added the&amp;nbsp;/opt/cloudera/parcels/CDH/lib/hbase/lib/htrace-core-3.1.0-incubating.jar to the end of the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;executing "/opt/cloudera/parcels/CDH/lib/spark/bin/run-example HBaseTest test2" now works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2015 06:56:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29253#M6446</guid>
      <dc:creator>micbster</dc:creator>
      <dc:date>2015-07-05T06:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29367#M6447</link>
      <description>&lt;P&gt;You need to &lt;STRONG&gt;always&lt;/STRONG&gt; provide your own dependencies for your application. There is no dependency on HBase in Spark and the fact that &lt;EM&gt;some&lt;/EM&gt; of the HBase jars are pulled in due to being part of a Hive dependency which Spark has is a coincidence.&lt;/P&gt;&lt;P&gt;If you build an application then you should always make sure that you resolve your own dependencies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might have worked in previous versions or in a distribution from a different provider out of the box becuase the Spark version had different dependencies.&lt;/P&gt;&lt;P&gt;BTW: you should be using the spark.[driver|executor].extraClassPath settings as that is the current way to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wilfred&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2015 07:43:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29367#M6447</guid>
      <dc:creator>Wilfred</dc:creator>
      <dc:date>2015-07-08T07:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/42176#M6448</link>
      <description>&lt;P&gt;It worked for me.. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 08:53:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/42176#M6448</guid>
      <dc:creator>mkanchwala</dc:creator>
      <dc:date>2016-06-21T08:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: ClassNotFoundException: org.apache.htrace.Trace exception in spark shell for HBase cdh5.4.1</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/50863#M6449</link>
      <description>&lt;PRE&gt;--conf "spark.driver.extraClassPath=/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jars/htrace-core-3.1.0-incubating.jar:/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/lib/hive/conf:/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/lib/hive/lib/*.jar" \&lt;BR /&gt;--conf "spark.executor.extraClassPath=/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jars/htrace-core-3.1.0-incubating.jar:/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/lib/hive/conf:/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/lib/hive/lib/*.jar" \&lt;BR /&gt;--conf "spark.driver.extraJavaOptions=-XX:MaxPermSize=1024m -XX:PermSize=256m" \&lt;BR /&gt;--conf "spark.executor.extraJavaOptions=-XX:MaxPermSize=1024m -XX:PermSize=256m" \&lt;/PRE&gt;&lt;P&gt;work for me&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 09:30:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/50863#M6449</guid>
      <dc:creator>terry19850289</dc:creator>
      <dc:date>2017-02-14T09:30:12Z</dc:date>
    </item>
  </channel>
</rss>

