Hello,

   I'm just starting with hive, and I ran into a newbie problem that didn't 
have a solution via google. So I thought I'd record the solution for posterity 
(and other hapless newbies) :)

I've been using hadoop/hbase for a while, and have configured hadoop-env.sh a 
bit here and there (to work with hbase, etc). At some point, I dropped the 
$CLASSPATH off the end of the standard line:

export 
HADOOP_CLASSPATH=/home/stu/hbase/hbase-0.20.6.jar:/home/stu/hbase/hbase-0.20.6-test.jar:/home/stu/hbase/conf:/home/stu/hbase/lib/zookeeper-3.2.2.jar:$CLASSPATH

So it became:

# Extra Java CLASSPATH elements.  Optional.
export 
HADOOP_CLASSPATH=/home/stu/hbase/hbase-0.20.6.jar:/home/stu/hbase/hbase-0.20.6-test.jar:/home/stu/hbase/conf:/home/stu/hbase/lib/zookeeper-3.2.2.jar

(probably when I added the hbase stuff or something). My hadoop/hbase set up 
runs fine, so I never noticed.

Well, if you do that, and you try to run the hive shell, you get the:

s...@ubuntu-update:~/hive-0.6.0/bin/ext$ /home/stu/hadoop-0.20.2/bin/hadoop jar 
/home/stu/hive-0.6.0/lib/hive-cli-0.6.0.jar org.apache.hadoop.hive.cli.CliDriver
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/hadoop/hive/conf/HiveConf
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
Caused by: java.lang.ClassNotFoundException: 
org.apache.hadoop.hive.conf.HiveConf
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 3 more

error, even if you've followed the wiki correctly and set HADOOP_HOME and 
HIVE_HOME correctly. Note the command line above is a little strange, because I 
was debugging through the $HIVE_HOME/bin/hive script... (So I printed out the 
classpath it was forming, set it by hand, ran the instructions by hand, etc).

This is installing from the hive tar (stable). But that doesn't matter.

Anyways, hope the answer helps someone..

Best,
  -stu




      

Reply via email to