title: Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration compiling using javac
body: <p>I'm a beginner in Hadoop and MapReduce. After I installed Hadoop on my Ubuntu VM, I tried some starter examples like Wordcount and Anagram.</p>
  
  <p>I would like to do an <code>Apriori on MapReduce</code>. I found this one on Sourceforge (<a href="http://sourceforge.net/p/apriorimapred/wiki/Home/" rel="nofollow noreferrer">http://sourceforge.net/p/apriorimapred/wiki/Home/</a>). </p>
  
  <p>After I download and installed some required components such as <code>HBase</code> and <code>Log4j</code> (though I have problems installing log4j so I chose to disable them by setting the level to off), </p>
  
  <p>I struggle with the problem </p>
  
  <pre><code>"Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration" -- as in the picture. (https://dl.dropboxusercontent.com/u/51053996/Pics/hadoop%20classnotfound.jpg)
  </code></pre>
  
  <p>It happens every time I would like to run the jar file.
  The steps I take are</p>
  
  <pre><code>1. javac -cp "$HADOOP_HOME/share/hadoop/mapreduce/hadoop-common-2.0.0-alpha.jar:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.0.2-alpha.jar:$HADOOP_HOME/lib/commons-configuration-1.10/*:/usr/local/apache-log4j-1.2.17/log4j-1.2.17.jar:/usr/lib/hbase/hbase-0.94.8/hbase-0.94.8.jar" apriori.java
  
  2. jar -cvf apriori.jar -C . .
  
  3. $HADOOP_HOME/bin/hadoop jar /home/hduser/yarn/hadoop-2.5.1/share/hadoop/mapreduce/apriori.jar apriori /in /out2 /out2c /out2a
  </code></pre>
  
  <p>(The problem happens after I enter the command in step 3)
  There is no error shown after I compiled in step 1 (However, I have tried compiling while not including the <code>"/usr/lib/hbase/hbase-0.94.8/hbase-0.94.8.jar"</code> and there are around 100 errors -- so I guess the lib works well).</p>
  
  <p>I stick with this problem for around 2 weeks :( and couldn't find any working solutions. I have tried many suggestion I found such as fixing the environment variables, add some lines in <code>hbase-env.sh</code>, etc. Here are some that I bookmarked them (but didn't solve mine).</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/26364057/exception-in-thread-main-java-lang-noclassdeffounderror-org-apache-hadoop-hba">Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath">Setting multiple jars in java classpath</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/19150604/caused-by-java-lang-classnotfoundexception-org-apache-zookeeper-keeperexceptio">Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException</a></p></li>
  <li><p><a href="https://archanaschangale.wordpress.com/2013/08/29/installing-apache-hbase-on-ubuntu-for-standalone-mode/" rel="nofollow noreferrer">https://archanaschangale.wordpress.com/2013/08/29/installing-apache-hbase-on-ubuntu-for-standalone-mode/</a></p></li>
  <li><p><a href="http://www.quora.com/How-do-I-install-HBase-on-Ubuntu" rel="nofollow noreferrer">http://www.quora.com/How-do-I-install-HBase-on-Ubuntu</a></p></li>
  </ul>
  
  <p>Thank you so much and really appreciated every help,</p>
  
  <p>Spacez</p>