报错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
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
下一篇: 如何解决php不能上传中文文件问题