I am getting the following error
TestHBase.java:6: error: package org.apache.hadoop.conf does not exist
when trying the following in ubuntu 12.04:
hduser@ubuntu:~$ javac -classpath hbase-0.94.8.jar:hadoop-core-1.1.2.jar TestHBase.java
I've tried the following:
Copying hadoop-core-1.1.2.jar to hbase/lib after renaming the one that comes with hbase: hadoop-core-1.0.4.jar
Copying hadoop/lib/commons-*.jar libraries to hbase/lib hduser@ubuntu:~$ hbase/bin/hbase
I've checked my hbase classpath and it seems OK:
$ classpath | tr ":" "\n" | grep hadoop | head /home/hduser/hbase/lib/hadoop-core-1.1.2.jar /usr/local/hadoop/libexec/../conf /usr/local/hadoop/libexec/.. /usr/local/hadoop/libexec/../hadoop-core-1.1.2.jar /usr/local/hadoop/libexec/../lib/asm-3.2.jar
I am not sure what else can I try. I would appreciate any help.
The only way the compilation worked for me is by specifying full path:
javac -classpath /home/hduser/hbase/hbase-0.94.8.jar:/home/hduser/hbase/lib/hadoop-core-1.1.2.jar TestHBase.jar
But then I cannot run:
hduser@ubuntu:~$ ls -l
total 56578
-rw-r--r-- 1 hduser hadoop 8445 Jun 23 13:17 examples.desktop
drwxr-xr-x 12 hduser hadoop 1024 Jul 6 08:14 hbase
-rw-r--r-- 1 hduser hadoop 57691943 Jun 24 21:33 hbase-0.94.8.tar.gz
drwxr-xr-x 6 hduser hadoop 1024 Jun 25 07:14 hdfs-data
drwxr-xr-x 5 hduser hadoop 1024 Jun 25 07:14 hdfs-data-name
-rw-r--r-- 1 hduser hadoop 1247 Jul 10 07:18 TestHBase.class
-rw-r--r-- 1 hduser hadoop 875 Jul 6 07:03 TestHBase.java
drwxr-xr-x 4 hduser hadoop 1024 Jul 4 07:30 workspace
hduser@ubuntu:~$ java -cp /home/hduser/hbase/bin/hbase classpath TestHBase
Error: Could not find or load main class TestHBase