hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Smith <>
Subject Re: Hive Getting Started Wiki assumes $CLASSPATH at end of HADOOP_CLASSPATH
Date Tue, 09 Nov 2010 06:03:02 GMT

Hello Ted,

  Yes, I saw that mail when I googled. I'm pretty sure I didn't have the same problem. I
used the stable release tarball, which only has one bin dir, which I ran the exe from. 

Adding Classpath back onto HADOOP_CLASSPATH worked for me.
Was my solution misleading? I wouldn't want to confuse people, but it did work once I added
that back on..


Take care,

--- On Tue, 11/9/10, Ted Yu <> wrote:

From: Ted Yu <>
Subject: Re: Hive Getting Started Wiki assumes $CLASSPATH at end of HADOOP_CLASSPATH
Date: Tuesday, November 9, 2010, 12:45 AM

Please see Edward's reply to 'Exception in hive
 startup' on Oct 13th.
Try running with <install-dir>/bin/hive

On Mon, Nov 8, 2010 at 7:02 PM, Stuart Smith <> wrote:


   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 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:

stu@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

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(

        at org.apache.hadoop.util.RunJar.main(

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf


        at Method)


        at java.lang.ClassLoader.loadClass(

        at java.lang.ClassLoader.loadClass(

        ... 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..



View raw message