`

报错NoClassDefFoundError: scala/collection/Seq

 
阅读更多

报错NoClassDefFoundError: scala/collection/Seq

写道
Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Seq
at com.jzw.test.DataFrameApp.main(DataFrameApp.scala)
Caused by: java.lang.ClassNotFoundException: scala.collection.Seq
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more

 报这个错时要先看看是不是pom文件配错了,比如为了打包

<dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
      <scope>provided</scope>
    </dependency>

 把scala-library配成了provided

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics