0
votes

When I run the mahout command, the following error happens:

Running on hadoop, using /usr/local/hadoop/bin/hadoop and HADOOP_CONF_DIR= MAHOUT-JOB: /home/ubuntu/mahout/examples/target/mahout-examples-0.8-SNAPSHOT-job.jar Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.driver([Ljava/lang/String;)V at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.RunJar.main(RunJar.java:192)

I have relatively the same problem as here: mahout wont start up. Anything to do with compatible version between hadoop and mahout? The difference is that I'm using hadoop 0.21 and mahout 0.8. It is pointed out in the above question that this bug has been fixed in mahout 0.8 but I still encountered the same error.

I found another solution about this problem at http://comments.gmane.org/gmane.comp.apache.mahout.user/14817 where the author suggested changing the pom.xml file. I tried to change the hadoopverion in the main pom file from 1.1.2 to 0.21.0 but maven repository doesn't have that dependency. Therefore, I changed to 0.20.2 but then mvn compile does not work (mvn compile and mvn install work when I use the hadoop 1.1.2).

Do you have any idea or suggestion ? Thank you.

1
Seems that on 0.21 there were some method signature changes, hence the method cannot be found.Julian Ortega

1 Answers

0
votes

What mahout command are you running?

Are you able to successfully run the example commands listed in the documentation?

That mahout main method is loading classes dynamically based on the arguments that you pass into it, and if they are malformed then you could get a NoSuchMethodError like above.