当我运行linear support vector machines svms的代码时,会导致错误:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/util/StopWatch
at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:314)
at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:207)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)
at scala.Option.getOrElse(Option.scala:120)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.StopWatch
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)
你能告诉我包含org.apache.hadoop.util.StopWatch
的maven依赖吗?
答案 0 :(得分:5)
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.2</version>
</dependency>