Hi Massoud, Once you did "ant package", you will need to go into "build/dist" and then run "bin/hive"
Zheng On Fri, Nov 6, 2009 at 11:27 AM, Ning Zhang <[email protected]> wrote: > Sorry there was a typo in my previous email: please replace testcaes > to testcase in the unit test command. Basically if the unit tests do > not pass, the hive distribution is not working. I suggest you check > out a brand new trunk and try 'ant package' followed by ant test of > one of the unit test qfile (e.g., create_1.q). > > If that still fails, please open a JIRA under hadoop/Hive and include > all the info about the environment and steps you have done and also > post the log file under your build/ql/tmp/hive.log after you have run > the one unit test. > > Ning > > On Nov 6, 2009, at 11:13 AM, Massoud Mazar wrote: > > > I tried both trunk and /tags/release-0.4.0 (currently using 0.4.0) > > $JAVA_HOME points to /usr/lib/jvm/java-6-sun > > I'm using ubuntu server, so I guess it is bash > > > > ant test -Dtestcaes=TestCliDriver -Dqfile=create_1.q > > says (at the end) > > > > BUILD FAILED > > /tmp/hive/build.xml:142: The following error occurred while > > executing this line: > > /tmp/hive/build.xml:89: The following error occurred while executing > > this line: > > /tmp/hive/build-common.xml:316: Tests failed! > > > > -----Original Message----- > > From: Ning Zhang [mailto:[email protected]] > > Sent: Friday, November 06, 2009 1:29 PM > > To: [email protected] > > Subject: Re: Problem installing Hive on hadoop 0.20.1 > > > > Are you using Hive trunk or branch-0.4? Which version of Java > > $JAVA_HOME is pointing to? Which shell are you using (csh/bash...)? > > Are you able to run some unit test under your "build directory" (the > > directory which contains build/dist), say ant test - > > Dtestcaes=TestCliDriver -Dqfile=create_1.q > > > > Ning > > > > On Nov 6, 2009, at 9:00 AM, Massoud Mazar wrote: > > > >> Tried all paths suggested, still get the same error. $CDPATH is > >> empty and > >> > >> had...@hadoop-1:/usr/local/hive/bin$ echo $PATH > >> /usr/local/bin:/usr/bin:/bin > >> > >> -----Original Message----- > >> From: Ning Zhang [mailto:[email protected]] > >> Sent: Friday, November 06, 2009 11:45 AM > >> To: [email protected] > >> Subject: Re: Problem installing Hive on hadoop 0.20.1 > >> > >> can you try under /usr/local/hive > >> > >> $ ./bin/hive > >> > >> or > >> > >> $ cd /usr/local/hive/bin > >> $ ./hive > >> > >> if it doesn't work, also try to cd your build/dist/bin/ and run ./ > >> hive > >> over there. > >> > >> hive is a shell script and it uses some tricks like cd $var;pwd to > >> decide which directory hive is running, based on which decide where > >> are the jar files etc. I think bin/hive may have problems when you > >> have $PATH which have other directories have subdirectory bin/hive. > >> Or > >> if you have $CDPATH set, you may also have problems. > >> > >> Ning > >> > >> On Nov 6, 2009, at 8:29 AM, Massoud Mazar wrote: > >> > >>> Ning, thanks for the reply. > >>> I do have all the files under /usr/local/hive and $HADOOP_HOME is > >>> also set: > >>> > >>> had...@hadoop-1:/usr/local/hive$ ls > >>> bin conf examples lib README.txt > >>> had...@hadoop-1:/usr/local/hive$ ls lib > >>> antlr-runtime-3.0.1.jar hive_anttasks.jar jdo2-api-2.3- > >>> SNAPSHOT.jar > >>> asm-3.1.jar hive_cli.jar jline-0.9.94.jar > >>> commons-cli-2.0-SNAPSHOT.jar hive_common.jar json.jar > >>> commons-codec-1.3.jar hive_contrib.jar junit-3.8.1.jar > >>> commons-collections-3.2.1.jar hive_exec.jar libfb303.jar > >>> commons-lang-2.4.jar hive_hwi.jar libthrift.jar > >>> commons-logging-1.0.4.jar hive_hwi.war log4j-1.2.15.jar > >>> commons-logging-api-1.0.4.jar hive_jdbc.jar php > >>> datanucleus-core-1.1.2.jar hive_metastore.jar py > >>> datanucleus-enhancer-1.1.2.jar hive_serde.jar > >>> stringtemplate-3.1b1.jar > >>> datanucleus-rdbms-1.1.2.jar hive_service.jar velocity-1.5.jar > >>> derby.jar hive_shims.jar > >>> had...@hadoop-1:/usr/local/hive$ echo $HADOOP_HOME > >>> /usr/local/hadoop > >>> > >>> That is why I'm confused. > >>> > >>> -----Original Message----- > >>> From: Ning Zhang [mailto:[email protected]] > >>> Sent: Friday, November 06, 2009 11:25 AM > >>> To: [email protected] > >>> Subject: Re: Problem installing Hive on hadoop 0.20.1 > >>> > >>> It seems you don't have the jar files installed under /usr/local/ > >>> hive. > >>> When you install hive, make sure to copy all files/subdirectories > >>> under build/dist to /usr/local/hive. Also $HADOOP_HOME need to be > >>> set. > >>> > >>> Ning > >>> > >>> On Nov 6, 2009, at 7:15 AM, Massoud Mazar wrote: > >>> > >>>> Hi, > >>>> > >>>> I have a 2 node hadoop/hbase cluster which is working fine. > >>>> hadoop was installed based on instructions at > http://www.michael-noll.com/wiki/Running_Hadoop_On_Ubuntu_Linux_(Multi-Node_Cluster)<http://www.michael-noll.com/wiki/Running_Hadoop_On_Ubuntu_Linux_%28Multi-Node_Cluster%29> > >>>> > >>>> I followed hive installation instructions at > http://wiki.apache.org/hadoop/Hive/GettingStarted > >>>> . > >>>> When I try to run hive CLI, I get the following error: > >>>> > >>>> had...@hadoop-1:/usr/local/hive$ bin/hive > >>>> 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:200) > >>>> at java.security.AccessController.doPrivileged(Native Method) > >>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > >>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > >>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > >>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > >>>> 320) > >>>> ... 3 more > >>>> > >>>> Any help is greatly appreciated. > >>>> Massoud > >>> > >> > > > > -- Yours, Zheng
