Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was trying to run the mahout clustering example from the quickstart at: https://cwiki.apache.org/MAHOUT/clustering-of-synthetic-control-data.html

While running any of the clustering implementations as specified here, I get the following exception(s):

What I don't understand is that I have downloaded the latest available copy of mahout from the website and built it using maven. How can a class be missing?

Any help is highly appreciated.

Thanks.

Error: java.lang.ClassNotFoundException: org.apache.mahout.math.Vector
    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.io.WritableName.getClass(WritableName.java:71)
    at org.apache.hadoop.io.SequenceFile$Reader.getValueClass(SequenceFile.java:1613)
    at org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1555)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1428)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1417)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1412)
    at org.apache.hadoop.mapreduce.lib.input.SequenceFileRecordReader.initialize(SequenceFileRecordReader.java:50)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
    at org.apache.hadoop.mapred.Child.main(Child.java:170)

11/06/19 16:15:35 INFO mapred.JobClient: Task Id : attempt_201106191612_0002_m_000000_1, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.mahout.math.Vector
    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.io.WritableName.getClass(WritableName.java:71)
    at org.apache.hadoop.io.SequenceFile$Reader.getValueClass(SequenceFile.java:1613)
    at org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1555)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1428)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1417)
    at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1412)
    at org.apache.hadoop.mapreduce.lib.input.SequenceFileRecordReader.initialize(SequenceFileRecordReader.java:50)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
    at org.apache.hadoop.mapred.Child.main(Child.java:170)
share|improve this question
add comment

migrated from stackoverflow.com Jun 20 '11 at 12:32

This question came from our site for professional and enthusiast programmers.

1 Answer

Mahout has run into problems from time to time with the way that hadoop manages the classpath. Further, there is some evidence that some versions of hadoop (you didn't mention yours) or configuration don't support the 'jars embedded in a job jar' feature that the Mahout job jars depend on.

You might get better results with the current version (you didn't mention the version you have). You will get better help on the mahout user mailing list.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.