我試圖從https://cwiki.apache.org/confluence/display/MAHOUT/Wikipedia+Bayes+Example產生的原因:拋出java.lang.ClassNotFoundException:類路徑
運行維基百科貝葉斯例子當我運行下面的命令:$ MAHOUT_HOME /斌/亨利馬烏wikipediaXMLSplitter -d $ MAHOUT_HOME /例子/溫度/ -c 64
我收到此錯誤enwiki-最新的頁面,articles10.xml -o維基百科/塊:
Exception in thread "main" java.lang.NoClassDefFoundError: classpath
Caused by: java.lang.ClassNotFoundException: classpath
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Running on hadoop, using /x/.../bin/hadoop and HADOOP_CONF_DIR=
MAHOUT-JOB: /x/.../mahout-distribution-0.7/mahout-examples-0.7-job.jar
12/07/25 11:22:06 WARN driver.MahoutDriver: Unable to add class: wikipediaXMLSplitter
12/07/25 11:22:06 WARN driver.MahoutDriver: No wikipediaXMLSplitter.props found on classpath, will use command-line arguments only
Unknown program 'wikipediaXMLSplitter' chosen.