Hi Aaron, You'll need to either check out trunk, or else apply HIVE-2673 to the release-0.8-r2 branch.
Then follow the directions here: https://cwiki.apache.org/confluence/display/Hive/GettingStarted+EclipseSetup Then install the Datanucleus Eclipse Plugin: http://www.datanucleus.org/products/accessplatform/guides/eclipse/index.html Run the Datanucleus Enhancer on the Hive project that you have imported into Eclipse. At this point you should be able to start the CLI using the Eclipse launch configuration. Thanks. Carl On Wed, Feb 15, 2012 at 7:07 PM, Ashish Sharma <thisisnotmylo...@gmail.com>wrote: > 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 > > >