本文介绍了Mahout IntDoubleProcedure NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用我的学校的服务器已经有hadoop和mahout。
但我需要解析csv向量。所以我尝试了别人从git的代码。
但是我得到了以下我无法解决的异常。
I'm using my school's server which already have hadoop and mahout.But I need to parse csv to vector. So I tried someone else code from git.But I got the following exception which I can't solve.
dcmac04:dir username$ java -jar BigDataNaiveBayes_fat.jar
May 30, 2015 1:48:17 AM org.apache.hadoop.util.NativeCodeLoader <clinit>
WARNING: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
May 30, 2015 1:48:17 AM org.apache.hadoop.io.compress.CodecPool getCompressor
INFO: Got brand-new compressor
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/mahout/math/function/IntDoubleProcedure
at NaiveBayes.CsvToVectors.vectorize(CsvToVectors.java:53)
at NaiveBayes.MahoutTest.csv2vectors(MahoutTest.java:53)
at NaiveBayes.MahoutTest.main(MahoutTest.java:149)
Caused by: java.lang.ClassNotFoundException: org.apache.mahout.math.function.IntDoubleProcedure
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:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
非常感谢。
我的jar已经包含mahout-数学... jar和mahout-core ... jar和其他jar。
My jar has already including mahout-math...jar and mahout-core...jar and some other jar.
推荐答案
我错过了包mahout-collections -1.0.jar。
I missed the package mahout-collections-1.0.jar.
这篇关于Mahout IntDoubleProcedure NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!