问题描述
我先用maven打包了要运行的scala程序,用spark-submit提交了以后报错内容如下:Exceptioninthread"main"java.lang.NoClassDefFoundError:edu/umd/cloud9/collection/wikipedia/WikipediaPageatcom.cloudera.datascience.lsa.RunLSA$.preprocessing(RunLSA.scala:54)atcom.cloudera.datascience.lsa.RunLSA$.main(RunLSA.scala:33)atcom.cloudera.datascience.lsa.RunLSA.main(RunLSA.scala)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:497)atorg.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:674)atorg.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)atorg.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)atorg.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)atorg.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)Causedby:java.lang.ClassNotFoundException:edu.umd.cloud9.collection.wikipedia.WikipediaPageatjava.net.URLClassLoader.findClass(URLClassLoader.java:381)atjava.lang.ClassLoader.loadClass(ClassLoader.java:424)atjava.lang.ClassLoader.loadClass(ClassLoader.java:357)...12more我检查了下pom文件,这个类的依赖已经添加,并检查了本地仓库,也有这个类