jpmml / jpmml-sparkml

Java library and command-line application for converting Apache Spark ML pipelines to PMML
GNU Affero General Public License v3.0
267 stars 80 forks source link

Tests fail when installing #43

Closed harmands closed 6 years ago

harmands commented 6 years ago

I have spark pipelines from spark 2.1 So, I checked out the tag 1.2.7 to build.

The build fails, I don't think, it is related to the conflicts mentioned in the README.

These are the logs

mvn clean install

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building JPMML-SparkML 1.2.7
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jpmml-sparkml ---
[INFO] Deleting /home/delhivery/dev/jpmml-sparkml/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ jpmml-sparkml ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (default) @ jpmml-sparkml ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-test) @ jpmml-sparkml ---
[INFO] jacoco.agent set to -javaagent:/home/delhivery/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/delhivery/dev/jpmml-sparkml/target/jacoco.exec
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jpmml-sparkml ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ jpmml-sparkml ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 53 source files to /home/delhivery/dev/jpmml-sparkml/target/classes
[INFO] /home/delhivery/dev/jpmml-sparkml/src/main/java/org/jpmml/sparkml/WeightedTermFeature.java: Some input files use or override a deprecated API.
[INFO] /home/delhivery/dev/jpmml-sparkml/src/main/java/org/jpmml/sparkml/WeightedTermFeature.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/delhivery/dev/jpmml-sparkml/src/main/java/org/jpmml/sparkml/ConverterUtil.java: /home/delhivery/dev/jpmml-sparkml/src/main/java/org/jpmml/sparkml/ConverterUtil.java uses unchecked or unsafe operations.
[INFO] /home/delhivery/dev/jpmml-sparkml/src/main/java/org/jpmml/sparkml/ConverterUtil.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jpmml-sparkml ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 62 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ jpmml-sparkml ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /home/delhivery/dev/jpmml-sparkml/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ jpmml-sparkml ---
[INFO] Surefire report directory: /home/delhivery/dev/jpmml-sparkml/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:510)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:522)
Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
    at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
    at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
FATAL ERROR in native method: processing of -javaagent failed
    at org.jacoco.agent.rt.internal_8ff85ea.PreMain.createRuntime(PreMain.java:55)
    at org.jacoco.agent.rt.internal_8ff85ea.PreMain.premain(PreMain.java:47)
    ... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
    at java.base/java.lang.Class.getField(Class.java:1958)
    at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
    ... 9 more
Aborted (core dumped)

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.266 s
[INFO] Finished at: 2018-05-23T16:26:03+05:30
[INFO] Final Memory: 79M/270M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jpmml-sparkml: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/delhivery/dev/jpmml-sparkml && /usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:/home/delhivery/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/delhivery/dev/jpmml-sparkml/target/jacoco.exec -jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefirebooter236796039577445911.jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire9119811316382229884tmp /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire_010927105446816610308tmp
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jpmml-sparkml: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /home/delhivery/dev/jpmml-sparkml && /usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:/home/delhivery/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/delhivery/dev/jpmml-sparkml/target/jacoco.exec -jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefirebooter236796039577445911.jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire9119811316382229884tmp /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire_010927105446816610308tmp
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /home/delhivery/dev/jpmml-sparkml && /usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:/home/delhivery/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/delhivery/dev/jpmml-sparkml/target/jacoco.exec -jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefirebooter236796039577445911.jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire9119811316382229884tmp /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire_010927105446816610308tmp
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.RuntimeException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /home/delhivery/dev/jpmml-sparkml && /usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:/home/delhivery/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/delhivery/dev/jpmml-sparkml/target/jacoco.exec -jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefirebooter236796039577445911.jar /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire9119811316382229884tmp /home/delhivery/dev/jpmml-sparkml/target/surefire/surefire_010927105446816610308tmp
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork (ForkStarter.java:590)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork (ForkStarter.java:460)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:229)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:201)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1026)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:862)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:755)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[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/PluginExecutionException
vruusmann commented 6 years ago

All JPMML-SparkML library versions are available via Maven Central repository. There is no need to build anything locally, unless you consider yourself an expert, and want to implement custom transformer/model types.

I checked out the tag 1.2.7 to build.

Why not the HEAD version of the 1.2.X development branch?

The build fails

The tag 1.2.7 depends on JaCoCo 0.7.9, which is not Java 9/10 compatible. You need to upgrade either JaCoCo to 0.8.1, or downgrade Java to 8.

Anyway, the HEAD version of the 1.2.X development branch has already been updated to JaCoCo 0.8.1, so this issue can be closed as invalid/nothing to do.

harmands commented 6 years ago

Thanks man, I was using java-11 somehow.