欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

报错NoClassDefFoundError: scala/collection/Seq

程序员文章站 2022-03-24 11:02:06
...

报错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