Re: Problem running hive from eclipse
Hi, I don't know if this will help but I do a clean package separately and before running eclipse-files. This has always worked, but with a few quirks. -- Brock Noland Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Thursday, February 21, 2013 at 7:01 AM, amareshwari sriramdasu wrote: Hi, I'm trying to launch junit test from eclipse, it fails with ClassNotFoundException. I did 'ant clean package eclipse-files' and imported the project into eclipse, as specified in https://cwiki.apache.org/Hive/gettingstarted-eclipsesetup.html. When I run HIveCLI or TestCliDriver it says Errors exist in required projects: hive Proceed with launch? When I proceed, it fails with Exception in thread main java.lang.NoClassDefFoundError: org/apache/hadoop/hive/cli/CliDriver Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.cli.CliDriver 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:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Any help to come out this problem is much appreciated. Environment : OS : Mac OSX Lion 10.7.3 Java : 1.6.0.jdk Thanks Amareshwari
Re: Problem running hive from eclipse
make sure you have correct jar files included in your eclipse application launcher. Try this: Go to Run Configuration by right clicking on your project - click Run As - Select Run Configuration Select TestCliDriver JUNIT luncher-click on ClassPath tab- make sure all your jar files are there. Best Regards Amir Sanjar System Management Architect PowerLinux Open Source Hadoop development lead IBM Senior Software Engineer Phone# 512-286-8393 Fax# 512-838-8858 From: amareshwari sriramdasu amareshw...@gmail.com To: hive-...@hadoop.apache.org, Date: 02/21/2013 07:04 AM Subject:Problem running hive from eclipse Hi, I'm trying to launch junit test from eclipse, it fails with ClassNotFoundException. I did 'ant clean package eclipse-files' and imported the project into eclipse, as specified in https://cwiki.apache.org/Hive/gettingstarted-eclipsesetup.html. When I run HIveCLI or TestCliDriver it says Errors exist in required projects: hive Proceed with launch? When I proceed, it fails with Exception in thread main java.lang.NoClassDefFoundError: org/apache/hadoop/hive/cli/CliDriver Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.cli.CliDriver 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:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Any help to come out this problem is much appreciated. Environment : OS : Mac OSX Lion 10.7.3 Java : 1.6.0.jdk Thanks Amareshwari
running Hive from Eclipse fails
Hi, When I try to run Hive by HiveCli.Launch I get this error: The archive: /hive-trunk/build/hadoopcore/hadoop-0.20.2/conf which is referenced by the classpath, does not exist. What should I do? Moreover, do I have to start hadoop manually before starting Hive? Thank you for your reply. Mahsa
Re: Running hive in eclipse
I has the same problem. Can anyone help us? El 15 de febrero de 2012 13:52, Aaron Sun aaron.su...@gmail.com escribió: Hi Team, I am trying to run and debug hive in eclipse. I checked out release-0.8.0 1215012 from the SVN repository and built the project with thrift and fb303 library installed correctly. The building process returned Build Successfully. Then I tried to launch the cli by running CliDriver.java as a Java Application, and it returned errors as Exception in thread main java.lang.RuntimeException: Failed to load Hive builtin functions at org.apache.hadoop.hive.ql.session.SessionState.init(SessionState.java:190) at org.apache.hadoop.hive.cli.CliSessionState.init(CliSessionState.java:81) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:576) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:131) at java.util.jar.JarFile.init(JarFile.java:150) at java.util.jar.JarFile.init(JarFile.java:87) at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:90) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:66) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:71) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150) at java.net.URL.openStream(URL.java:1029) at org.apache.hadoop.hive.ql.exec.FunctionRegistry.registerFunctionsFromPluginJar(FunctionRegistry.java:1194) at org.apache.hadoop.hive.ql.session.SessionState.init(SessionState.java:187) ... 3 more I looked over the build.xml under ./builtins directory, and noticed that the compile and jar targets are both commented, and no jar is generated for builtins target name=compile depends=init, setup echo message=Project: ${ant.project.name}/ !-- defer compilation until package phase -- /target target name=jar depends=init echo message=Project: ${ant.project.name}/ !-- defer compilation until package phase -- /target I then manually changed the build.xml for compile part as follows and rebuilt the project: target name=compile depends=init, setup echo message=Project: ${ant.project.name}/ javac encoding=${build.encoding} srcdir=${src.dir} includes=**/*.java destdir=${build.classes} debug=${javac.debug} deprecation=${javac.deprecation} includeantruntime=false compilerarg line=${javac.args} ${javac.args.warnings} / classpath refid=classpath/ /javac /target Now the 'hive-buitins-0.8.0-SNAPSHOT.jar' is under the .build/buitins directory. However, I am still getting the same error message as Failed to load Hive builtin functions. Could someone kindly let me know what is the problem and how I should run cli correctly in eclipse? Thanks Aaron -- Ing. Alexis de la Cruz Toledo. *Av. Instituto Politécnico Nacional No. 2508 Col. San Pedro Zacatenco. México, D.F, 07360 * *CINVESTAV, DF.*
Re: Running hive in eclipse
Hello there , https://issues.apache.org/jira/browse/HIVE-2673, this might be helpful. On Thu, Feb 16, 2012 at 1:22 AM, Aaron Sun aaron.su...@gmail.com wrote: Hi Team, I am trying to run and debug hive in eclipse. I checked out release-0.8.0 1215012 from the SVN repository and built the project with thrift and fb303 library installed correctly. The building process returned Build Successfully. Then I tried to launch the cli by running CliDriver.java as a Java Application, and it returned errors as Exception in thread main java.lang.RuntimeException: Failed to load Hive builtin functions at org.apache.hadoop.hive.ql.session.SessionState.init(SessionState.java:190) at org.apache.hadoop.hive.cli.CliSessionState.init(CliSessionState.java:81) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:576) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:131) at java.util.jar.JarFile.init(JarFile.java:150) at java.util.jar.JarFile.init(JarFile.java:87) at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:90) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:66) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:71) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150) at java.net.URL.openStream(URL.java:1029) at org.apache.hadoop.hive.ql.exec.FunctionRegistry.registerFunctionsFromPluginJar(FunctionRegistry.java:1194) at org.apache.hadoop.hive.ql.session.SessionState.init(SessionState.java:187) ... 3 more I looked over the build.xml under ./builtins directory, and noticed that the compile and jar targets are both commented, and no jar is generated for builtins target name=compile depends=init, setup echo message=Project: ${ant.project.name}/ !-- defer compilation until package phase -- /target target name=jar depends=init echo message=Project: ${ant.project.name}/ !-- defer compilation until package phase -- /target I then manually changed the build.xml for compile part as follows and rebuilt the project: target name=compile depends=init, setup echo message=Project: ${ant.project.name}/ javac encoding=${build.encoding} srcdir=${src.dir} includes=**/*.java destdir=${build.classes} debug=${javac.debug} deprecation=${javac.deprecation} includeantruntime=false compilerarg line=${javac.args} ${javac.args.warnings} / classpath refid=classpath/ /javac /target Now the 'hive-buitins-0.8.0-SNAPSHOT.jar' is under the .build/buitins directory. However, I am still getting the same error message as Failed to load Hive builtin functions. Could someone kindly let me know what is the problem and how I should run cli correctly in eclipse? Thanks Aaron
Running Hive from Eclipse
Hi folks, I am trying to run Hive from eclipse. I've set it up correctly and it is building the jars and stuff. However I face execeptions when I try to run hive queries like show tables etc. There has been a discussion on this in the mailing list previously but there was no solution provided. It runs perfectly from command line . I am making a few changes to the hive source and every time I need to jar it from the command line and run it .Is there some way to run it directly from eclipse? Please help, Thanks, JS
Re: Running Hive from Eclipse
Hi John, Can you please include the error messages/exceptions that you're encountering? Thanks. Carl On Thu, Aug 11, 2011 at 1:40 PM, john smith js1987.sm...@gmail.com wrote: Hi folks, I am trying to run Hive from eclipse. I've set it up correctly and it is building the jars and stuff. However I face execeptions when I try to run hive queries like show tables etc. There has been a discussion on this in the mailing list previously but there was no solution provided. It runs perfectly from command line . I am making a few changes to the hive source and every time I need to jar it from the command line and run it .Is there some way to run it directly from eclipse? Please help, Thanks, JS
Re: Running Hive from eclipse[SOLVED]
Hi, Running CliDriver.java worked as its doing the necessary initializations . Thanks On Thu, Feb 10, 2011 at 5:32 PM, bharath vissapragada bharathvissapragada1...@gmail.com wrote: Hi all, I loaded Hive source as a java project in eclipse using the ant build. I modified source and I am trying to fire Hive queries my adding a main function to ql/Driver.java .. Following is the trace I get after issuing the query.. 11/02/10 17:09:51 INFO ql.Driver: received the command:select * from page_view JOIN page_view1 ON (page_view.country = page_view1.country) 11/02/10 17:09:51 INFO ql.Driver: compiling the command:select * from page_view JOIN page_view1 ON (page_view.country = page_view1.country) FAILED: Hive Internal Error: java.lang.NullPointerException(null) java.lang.NullPointerException at org.apache.hadoop.hive.ql.parse.VariableSubstitution.substitute(VariableSubstitution.java:20) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:326) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:745) at org.apache.hadoop.hive.ql.Driver.main(Driver.java:737) 11/02/10 17:09:51 ERROR ql.Driver: FAILED: Hive Internal Error: java.lang.NullPointerException(null) java.lang.NullPointerException at org.apache.hadoop.hive.ql.parse.VariableSubstitution.substitute(VariableSubstitution.java:20) at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:326) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:745) at org.apache.hadoop.hive.ql.Driver.main(Driver.java:737) Exception in thread main java.lang.NullPointerException at org.apache.hadoop.hive.ql.Driver.run(Driver.java:747) at org.apache.hadoop.hive.ql.Driver.main(Driver.java:737) 1st 2 lines are my logging statements for the query and I think this error is due to the misconfiguration of the metastore. Following is my conf/hive-default.xml (meta-store related settings) property namejavax.jdo.option.ConnectionURL/name valuejdbc:mysql://localhost/hive_meta?createDatabaseIfNotExist=true /value descriptionJDBC connect string for a JDBC metastore/description /property property namejavax.jdo.option.ConnectionDriverName/name valuecom.mysql.jdbc.Driver/value descriptionDriver class name for a JDBC metastore/description /property property namejavax.jdo.option.ConnectionUserName/name valueroot/value descriptionusername to use against metastore database/description /property property namejavax.jdo.option.ConnectionPassword/name value/value descriptionpassword to use against metastore database/description /property Even after running the query I dont see any databsase named hive_meta created in my mysql database. My tables are empty .. can this be the reason??? Thanks Bharath .V w:http://research.iiit.ac.in/bharath.v -- Regards, Bharath .V w:http://research.iiit.ac.in/~bharath.v