I have another related question:
If I specify -libjars 
/apps/mahout/trunk/core/target/mahout-core-0.9-SNAPSHOT.jar in my hadoop 
command, do I need to ensure that the  
/apps/mahout/trunk/core/target/mahout-core-0.9-SNAPSHOT.jar exists on each of 
the task tracker nodes where mapper will run. I have not installed mahout on 
the worker nodes and was hoping that hadoop through its libjar  option will 
ship the mentioned jar files onto worker nodes and will take care of making 
them available appropriately. 

> Date: Thu, 19 Dec 2013 10:05:57 -0800
> From: [email protected]
> Subject: Re: Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/mahout/math/Vector
> To: [email protected]
> 
> U r missing mahout-math.jar from your classpath because u r only keying off 
> mahout-core. 
> Include mahout-math.jar in your javac classpath.
> 
> 
> 
> 
> 
> On Thursday, December 19, 2013 1:04 PM, Sameer Tilak <[email protected]> wrote:
>  
> Hi everyone,
> I used the following commands to generate the jar file:
> javac -d /apps/analytics/myanalytics -classpath 
> .:/apps/mahout/trunk/core/target/mahout-core-0.9-SNAPSHOT.jar:/users/p529444/software/hadoop-1.0.3/hadoop-core-1.0.3.jar:/apps/mahout/trunk/core/target/mahout-core-0.9-SNAPSHOT-job.jar
>  SimpleKMeansClustering.java
> jar -cf myanalytics.jar myanalytics/
> I am getting the enclosed error message while executing the following command:
> hadoop jar /apps/analytics/myanalytics.jar myanalytics.SimpleKMeansClustering 
> -libjars /apps/mahout/trunk/core/target/mahout-core-0.9-SNAPSHOT.jar 
> /apps/mahout/trunk/math/target/mahout-math-0.9-SNAPSHOT.jar
> Warning: $HADOOP_HOME is deprecated.
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/mahout/math/Vector    at java.lang.Class.forName0(Native Method)   
>  at java.lang.Class.forName(Class.java:264)    at 
> org.apache.hadoop.util.RunJar.main(RunJar.java:149)Caused by: 
> java.lang.ClassNotFoundException: org.apache.mahout.math.Vector    at 
> java.net.URLClassLoader$1.run(URLClassLoader.java:366)    at 
> java.net.URLClassLoader$1.run(URLClassLoader.java:355)    at 
> java.security.AccessController.doPrivileged(Native Method)    at 
> java.net.URLClassLoader.findClass(URLClassLoader.java:354)    at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:423)    at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:356)
                                          

Reply via email to