对Apache Spark的不满意依赖:java.lang.NoClassDefFoundError:libsvm / svm_print_interface

时间:2017-04-22 23:04:14

标签: java scala apache-spark

我在标题中收到错误

java.lang.NoClassDefFoundError: libsvm/svm_print_interface

来自这行代码

    val model = new LibSVM()

当我尝试在spark集群上使用LibSVM库时。奇怪的是,当我在本地运行代码而没有Spark时,它运行正常。

build.sbt local dependencies

"nz.ac.waikato.cms.weka" % "weka-stable" % "3.8.1",
"nz.ac.waikato.cms.weka" % "LibSVM" % "1.0.10",
"org.apache.spark" %% "spark-core" % "2.1.0",
"org.apache.spark" % "spark-sql_2.11" % "2.1.0"

火花依赖

17/04/23 00:54:23 INFO SparkContext: Added JAR /.../.ivy2/cache/nz.ac.waikato.cms.weka/weka-stable/jars/weka-stable-3.8.1.jar at spark://192.168.0.104:44703/jars/weka-stable-3.8.1.jar with timestamp 1492901663416
17/04/23 00:54:23 INFO SparkContext: Added JAR /.../.ivy2/cache/nz.ac.waikato.cms.weka/LibSVM/jars/LibSVM-1.0.10.jar at spark://192.168.0.104:44703/jars/LibSVM-1.0.10.jar with timestamp 1492901663418
17/04/23 00:54:23 INFO SparkContext: Added JAR /.../target/scala-2.11/cmaes_spark_2.11-0.1.jar at spark://192.168.0.104:44703/jars/cmaes_spark_2.11-0.1.jar with timestamp 1492901663468

你有什么建议可以解决这个问题吗?

0 个答案:

没有答案