rapidsai / spark-examples

[ARCHIVED] Moved to github.com/NVIDIA/spark-xgboost-examples
https://github.com/NVIDIA/spark-xgboost-examples
Apache License 2.0
70 stars 40 forks source link

mvn package failed #37

Closed xiaonans closed 5 years ago

xiaonans commented 5 years ago

I run the following scripts: git clone https://github.com/rapidsai/spark-examples.git cd spark-examples mvn package -DxgbClassifier=cuda10

An error occurred:

[ERROR] error: scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found. [ERROR] at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17) [ERROR] at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102) [INFO] at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105) [INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257) [INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257) [INFO] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1391) [INFO] at scala.tools.nsc.Global$Run.(Global.scala:1216) [INFO] at scala.tools.nsc.Driver.doCompile(Driver.scala:31) [INFO] at scala.tools.nsc.MainClass.doCompile(Main.scala:23) [INFO] at scala.tools.nsc.Driver.process(Driver.scala:51) [INFO] at scala.tools.nsc.Driver.main(Driver.scala:64) [INFO] at scala.tools.nsc.Main.main(Main.scala) [INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [INFO] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [INFO] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [INFO] at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161) [INFO] at org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 54:27 min [INFO] Finished at: 2019-09-11T17:21:23+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:compile (default) on project sample_xgboost_apps: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

My java version:

openjdk version "11.0.4" 2019-07-16 OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3) OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

My maven version

Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 11.0.4, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.15.0-55-generic", arch: "amd64", family: "unix"

wjxiz1992 commented 5 years ago

Hi, This is a problem caused by scala's jdk compatibility. we can see from: here

JDK 11 requires minimum 2.11.12, but we set scala version to 2.11.6 in pom.xml because our development are all based on JDK 8. To solve this, whether you could set your JDK to 8, or you could modify scala.version to 2.11.12 in the pom I mentioned above. I would suggest the first option, because that would be the same as our dev&test environment. For second option, I succeeded building the jar, but I didn't run full tests on it.

xiaonans commented 5 years ago

Thanks. I set my JDK to 8 and that solved my problem.