mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Divya" <di...@k2associates.com.sg>
Subject unable to add class
Date Wed, 27 Oct 2010 02:57:15 GMT
Hi,
I am able to solve file not found exception 
I have added below code in mahout file under $MAHOUT_HOME$/bin
#Fix job path under cygwin
if $cygwin; then
  MAHOUT_JOB=`cygpath -p -w "$MAHOUT_JOB"`
Fi

But when I am trying to run the 
Divya@k2asystem /cygdrive/d/mahout-0.4
$ bin/mahout seqdirectory -i D:/Downloads/testInput -o D:/seqfileoutput1

Getting below errors 

        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.clustering.fuzzykmeans.FuzzyKMeansDriver
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.cf.taste.hadoop.item.RecommenderJob
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.clustering.canopy.CanopyDriver
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.math.hadoop.TransposeJob
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.clustering.dirichlet.DirichletDriver
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.math.hadoop.MatrixMultiplicationJob
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.math.hadoop.decomposer.EigenVerificationJob
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.clustering.lda.LDADriver
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 WARN driver.MahoutDriver: Unable to add class:
org.apache.maho
ut.clustering.kmeans.KMeansDriver
java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/JobContext
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:207)

        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.mapreduce.JobCont
ext
        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:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 13 more
10/10/27 10:52:49 ERROR text.SequenceFilesFromDirectory: Exception
org.apache.commons.cli2.OptionException: Missing required option --charset
        at
org.apache.commons.cli2.option.DefaultOption.validate(DefaultOption.j
ava:171)
        at
org.apache.commons.cli2.option.GroupImpl.validate(GroupImpl.java:249)

        at org.apache.commons.cli2.commandline.Parser.parse(Parser.java:105)
        at
org.apache.mahout.text.SequenceFilesFromDirectory.main(SequenceFilesF
romDirectory.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(Progra
mDriver.java:68)
        at
org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:141)
        at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:184)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Usage:

 [--keyPrefix <keyPrefix> --chunkSize <chunkSize> --charset <charset>
--output

<output> --help --input <input>]

Options

  --keyPrefix (-prefix) keyPrefix    The prefix to be prepended to the key

  --chunkSize (-chunk) chunkSize     The chunkSize in MegaBytes. Defaults to
64

  --charset (-c) charset             The name of the character encoding of
the

                                     input files

  --output (-o) output               The output directory

  --help (-h)                        Print out help

  --input (-i) input                 The input dir containing the documents

10/10/27 10:52:49 INFO driver.MahoutDriver: Program took 31 ms

-----Original Message-----
From: Divya [mailto:divya@k2associates.com.sg] 
Sent: Wednesday, October 27, 2010 9:33 AM
To: user@mahout.apache.org; dev@mahout.apache.org
Subject: file not found exception in mahout 0.4 

Hi,

 

I am using  to run Mahout 0.4 with cygwin 

When I type bin/mahout in cygwin command line 

I get the following error , though mahout-examples-0.4-job.jar exists at
same directory location 

 

$ bin/mahout

Running on hadoop, using HADOOP_HOME=C:\cygwin\home\Divya\hadoop-0.19.2

HADOOP_CONF_DIR=C:\cygwin\home\Divya\hadoop-0.19.2\conf

java.io.IOException: Error opening job jar:
/cygdrive/d/mahout-0.4/examples/targ

et/mahout-examples-0.4-job.jar

        at org.apache.hadoop.util.RunJar.main(RunJar.java:91)

        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)

        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)

Caused by: java.io.FileNotFoundException:
\cygdrive\d\mahout-0.4\examples\target

\mahout-examples-0.4-job.jar (The system cannot find the path specified)

        at java.util.zip.ZipFile.open(Native Method)

        at java.util.zip.ZipFile.<init>(ZipFile.java:114)

        at java.util.jar.JarFile.<init>(JarFile.java:135)

        at java.util.jar.JarFile.<init>(JarFile.java:72)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:89)

        ... 4 more

 

 

Regards,

Divya 



Mime
View raw message