mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Wignall <>
Subject error running a RecommenderJob
Date Wed, 18 Jan 2012 12:40:30 GMT
I am new to mahout, and am working my way through the Mahout In Action book. Now, I'm trying
to execute a RecommenderJob, and see the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli2/Option
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(
       at org.apache.hadoop.util.RunJar.main(
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli2.Option
       at Method)
       at java.lang.ClassLoader.loadClass(
       at java.lang.ClassLoader.loadClass(
       ... 3 more

The command I'm executing is as follows:

hadoop jar target/mahout-core-0.6-SNAPSHOT.jar
-Dmapred.output.dir=output --usersFile input/users.txt --booleanData

This differs slightly from the command prescribed in the Mahout In Action book:

bin/hadoop jar target/mahout-core-0.4-SNAPSHOT.job

-Dmapred.output.dir=output --usersFile input/users.txt --booleanData

Obvious differences are (i) I'm on Mahout 0.6, and (ii) I don't have a .job file to reference,
only a .jar (target/mahout-core-0.6-SNAPSHOT.jar). I don't know if I should be referencing
the .jar file in this way.

Now, I have built the jar myself, by executing:

mvn -DskipTests clean package
from the core directory of Mahout.

This appears to have worked fine, and I see the following in the core/target directory

drwxrwxr-x 6 martin martin    4096 2012-01-18 12:24 ./
drwxrwxr-x 8 martin martin    4096 2012-01-18 12:24 ../
drwxrwxr-x 3 martin martin    4096 2012-01-18 12:24 classes/
drwxrwxr-x 4 martin martin    4096 2012-01-18 12:24 generated-sources/
-rw-rw-r-- 1 martin martin 1641278 2012-01-18 12:24 mahout-core-0.6-SNAPSHOT.jar
drwxrwxr-x 2 martin martin    4096 2012-01-18 12:24 maven-archiver/
drwxrwxr-x 3 martin martin    4096 2012-01-18 12:24 test-classes/

Notice that there is no .job file, only a .jar.

I'm not sure if the problem I'm seeing is due to the lack of a .job file, or if it's something
else that I've got wrong.

Please can you help explain why I can't run the RecommenderJob?

Many thanks,



This e-mail is sent on behalf of Trader Media Group Limited, Registered Office: Auto Trader
House, Cutbush Park Industrial Estate, Danehill, Lower Earley, Reading, Berkshire, RG6 4UT(Registered
in England No. 4768833). This email and any files transmitted with it are confidential and
may be legally privileged, and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error please notify the sender.
This email message has been swept for the presence of computer viruses. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message