2013-04-17 48 views
2

我得到試圖在https://cwiki.apache.org/MAHOUT/recommendationexamples.html象夫 - 運行grouplens例如錯誤

運行grouplens例如下面的教程我PARAMS時出現錯誤:

windows 7 32bit, 
    jdk 1.7 
    maven 3.0.5 
    svn checkout of http://svn.apache.org/repos/asf/mahout/trunk 
    mahout v.0.8 
    installation: mvn -DskipTest clean install 

我的猜測是,我需要的cygwin安裝,但不希望要做到這一點,直到有人能證實這一點。

錯誤:

mvn -e -q exec:java -Dexec.mainClass="org.apache.mahout.cf.taste.example.grouplens.GroupLe 
nsRecommenderEvaluatorRunner" -Dexec.args="-i ratings.dat" 
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project mahout: An exception occured while executing the Java class. org.apache.mahout.cf. 
taste.example.grouplens.GroupLensRecommenderEvaluatorRunner -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project mahout: An exception occured while 
executing the Java class. org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluatorRunner 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
     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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluato 
rRunner 
     at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
     ... 19 more 
Caused by: java.lang.ClassNotFoundException: org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommenderEvaluatorRunner 
     at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
     at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:423) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:356) 
     at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285) 
     at java.lang.Thread.run(Thread.java:722) 
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 
+0

我在linux slackware機器上得到了完全相同的錯誤,'maven 3.0.4,java 1.6,kernel 2.6.36' – ulkas

回答

0

我解決了這個與第一安裝正確hadoop,然後開始與*all.sh啓動腳本中的Hadoop實例。

後來我安裝了mahout,cd examples/並運行abouve命令,它工作。

+1

我不認爲這與它有任何關係,因爲這是一個類路徑問題。你可能會把這些工件安裝在某處,並且工作。 –

+0

很可能是的。 – ulkas