Ich habe etwas darüber recherchiert und es scheint, dass es aufgrund einiger Versionskonflikte ist. Ich versuche, dies von einiger Zeit zu lösen, und bin mir nicht sicher, ob das Problem gelöst ist. Jede Hilfe wird sehr geschätzt.
Das ist mein pom.xml
<properties>
<scala.version>1.6.2</scala.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.11</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.11</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
Dies ist die Maven scala Plugin-Konfiguration, die ich verwende:
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.11</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<scalaVersion>2.11.8</scalaVersion>
</configuration>
</plugin>
Exception Trace:
--- 2017-09-06 09:54:21,676 INFO SparkUI: Started SparkUI at http://10.222.159.160:4040 (org.apache.spark.ui.SparkUI)
Exception in thread "main" java.lang.NoSuchMethodError: scala.reflect.api.JavaUniverse.runtimeMirror(Ljava/lang/ClassLoader;)Lscala/reflect/api/JavaUniverse$JavaMirror;
at com.abc.ModelTrn$.prepare(ModelTrn.scala:64)
at com.abc.ModelTrn$.main(ModelTrn.scala:20)
at com.abc.ModelTrn.main(ModelTrn.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)