You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by amareshwari sriramdasu <am...@gmail.com> on 2013/02/21 14:01:30 UTC
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
Re: Problem running hive from eclipse
Posted by Brock Noland <br...@cloudera.com>.
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
Posted by Amir Sanjar <v1...@us.ibm.com>.
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 <am...@gmail.com>
To: hive-dev@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