You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Nicolas Maillot <nm...@gmail.com> on 2010/07/13 11:11:29 UTC

ClassNotFoundException: org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper when invoking K-means example

Hi,

I am trying to have the kmeans example running but I get the  exception
below.

I have just compiled a fresh Mahout  from the trunk. All tests are
successful.
I run Hadoop-0.20.2 on my local machine.
java version 1.6.0_21 is installed.

Here is the  command used to launch the example: $HADOOP_HOME/bin/hadoop jar
$MAHOUT_HOME/examples/target/mahout-examples-0.4-SNAPSHOT.job
org.apache.mahout.clustering.syntheticcontrol.kmeans.Job

Is this issue related to the No class definition found for
org.apache.mahout.math.Vector ?

Any idea of what I can do to solve it ? Is there anything to add in the
classpath ?

Note that I was able to launch 20 newsgroup example.

Thanks a lot for your help

Regards,

Nicolas


10/07/13 10:47:45 INFO common.HadoopUtil: Deleting output
10/07/13 10:47:45 INFO kmeans.Job: Preparing Input
10/07/13 10:47:46 WARN mapred.JobClient: Use GenericOptionsParser for
parsing the arguments. Applications should implement Tool for the same.
10/07/13 10:47:46 WARN mapred.JobClient: No job jar file set.  User classes
may not be found. See JobConf(Class) or JobConf#setJar(String).
10/07/13 10:47:46 INFO input.FileInputFormat: Total input paths to process :
1
10/07/13 10:47:46 INFO mapred.JobClient: Running job: job_201007131046_0001
10/07/13 10:47:47 INFO mapred.JobClient:  map 0% reduce 0%
10/07/13 10:47:58 INFO mapred.JobClient: Task Id :
attempt_201007131046_0001_m_000000_0, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:809)
    at
org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:157)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:569)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
    at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.ClassNotFoundException:
org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
    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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at
org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762)
    at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:807)
    ... 4 more

Re: ClassNotFoundException: org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper when invoking K-means example

Posted by Nicolas Maillot <nm...@gmail.com>.
Hi Jeff,

Many thanks for the quick update. I have just rebuilt Mahout and everything
is now ok with the k-means example.

Nicolas



On Tue, Jul 13, 2010 at 9:10 PM, Jeff Eastman <jd...@windwardsolutions.com>wrote:

> Hi Nicolas,
>
> Thanks for the heads-up, the problem is repeatable and is caused by a
> missing  job.setJarByClass(InputDriver.class) in the InputDriver; an
> oversight introduced recently during the Hadoop 0.20.2 upgrade. I'm testing
> it now and will commit the patch soon.
>
> Jeff
>
>
> On 7/13/10 2:11 AM, Nicolas Maillot wrote:
>
>> Hi,
>>
>> I am trying to have the kmeans example running but I get the  exception
>> below.
>>
>> I have just compiled a fresh Mahout  from the trunk. All tests are
>> successful.
>> I run Hadoop-0.20.2 on my local machine.
>> java version 1.6.0_21 is installed.
>>
>> Here is the  command used to launch the example: $HADOOP_HOME/bin/hadoop
>> jar
>> $MAHOUT_HOME/examples/target/mahout-examples-0.4-SNAPSHOT.job
>> org.apache.mahout.clustering.syntheticcontrol.kmeans.Job
>>
>> Is this issue related to the No class definition found for
>> org.apache.mahout.math.Vector ?
>>
>> Any idea of what I can do to solve it ? Is there anything to add in the
>> classpath ?
>>
>> Note that I was able to launch 20 newsgroup example.
>>
>> Thanks a lot for your help
>>
>> Regards,
>>
>> Nicolas
>>
>>
>> 10/07/13 10:47:45 INFO common.HadoopUtil: Deleting output
>> 10/07/13 10:47:45 INFO kmeans.Job: Preparing Input
>> 10/07/13 10:47:46 WARN mapred.JobClient: Use GenericOptionsParser for
>> parsing the arguments. Applications should implement Tool for the same.
>> 10/07/13 10:47:46 WARN mapred.JobClient: No job jar file set.  User
>> classes
>> may not be found. See JobConf(Class) or JobConf#setJar(String).
>> 10/07/13 10:47:46 INFO input.FileInputFormat: Total input paths to process
>> :
>> 1
>> 10/07/13 10:47:46 INFO mapred.JobClient: Running job:
>> job_201007131046_0001
>> 10/07/13 10:47:47 INFO mapred.JobClient:  map 0% reduce 0%
>> 10/07/13 10:47:58 INFO mapred.JobClient: Task Id :
>> attempt_201007131046_0001_m_000000_0, Status : FAILED
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
>>     at
>> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:809)
>>     at
>> org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:157)
>>     at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:569)
>>     at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>>     at org.apache.hadoop.mapred.Child.main(Child.java:170)
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
>>     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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>     at java.lang.Class.forName0(Native Method)
>>     at java.lang.Class.forName(Class.java:247)
>>     at
>>
>> org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762)
>>     at
>> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:807)
>>     ... 4 more
>>
>>
>>
>
>

Re: ClassNotFoundException: org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper when invoking K-means example

Posted by Jeff Eastman <jd...@windwardsolutions.com>.
Hi Nicolas,

Thanks for the heads-up, the problem is repeatable and is caused by a 
missing  job.setJarByClass(InputDriver.class) in the InputDriver; an 
oversight introduced recently during the Hadoop 0.20.2 upgrade. I'm 
testing it now and will commit the patch soon.

Jeff

On 7/13/10 2:11 AM, Nicolas Maillot wrote:
> Hi,
>
> I am trying to have the kmeans example running but I get the  exception
> below.
>
> I have just compiled a fresh Mahout  from the trunk. All tests are
> successful.
> I run Hadoop-0.20.2 on my local machine.
> java version 1.6.0_21 is installed.
>
> Here is the  command used to launch the example: $HADOOP_HOME/bin/hadoop jar
> $MAHOUT_HOME/examples/target/mahout-examples-0.4-SNAPSHOT.job
> org.apache.mahout.clustering.syntheticcontrol.kmeans.Job
>
> Is this issue related to the No class definition found for
> org.apache.mahout.math.Vector ?
>
> Any idea of what I can do to solve it ? Is there anything to add in the
> classpath ?
>
> Note that I was able to launch 20 newsgroup example.
>
> Thanks a lot for your help
>
> Regards,
>
> Nicolas
>
>
> 10/07/13 10:47:45 INFO common.HadoopUtil: Deleting output
> 10/07/13 10:47:45 INFO kmeans.Job: Preparing Input
> 10/07/13 10:47:46 WARN mapred.JobClient: Use GenericOptionsParser for
> parsing the arguments. Applications should implement Tool for the same.
> 10/07/13 10:47:46 WARN mapred.JobClient: No job jar file set.  User classes
> may not be found. See JobConf(Class) or JobConf#setJar(String).
> 10/07/13 10:47:46 INFO input.FileInputFormat: Total input paths to process :
> 1
> 10/07/13 10:47:46 INFO mapred.JobClient: Running job: job_201007131046_0001
> 10/07/13 10:47:47 INFO mapred.JobClient:  map 0% reduce 0%
> 10/07/13 10:47:58 INFO mapred.JobClient: Task Id :
> attempt_201007131046_0001_m_000000_0, Status : FAILED
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
>      at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:809)
>      at
> org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:157)
>      at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:569)
>      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>      at org.apache.hadoop.mapred.Child.main(Child.java:170)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.mahout.clustering.syntheticcontrol.canopy.InputMapper
>      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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>      at java.lang.Class.forName0(Native Method)
>      at java.lang.Class.forName(Class.java:247)
>      at
> org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:762)
>      at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:807)
>      ... 4 more
>
>