-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Surefire Plugin version 3.1.2 can't execute on Java 6 and 7 #71
Comments
andrioli
added a commit
that referenced
this issue
Nov 3, 2023
The plugin version 3.1.2 can't be executed on Java 6 and 7: See: #71 See: #69 (comment) The error is: ``` Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project jaguar2-api: Error: Error: Please refer to /home/runner/work/jaguar2/jaguar2/jaguar2-api/target/surefire-reports for the individual test results. Error: Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. Error: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Error: Command was /bin/sh -c cd '/home/runner/work/jaguar2/jaguar2/jaguar2-api' && '/opt/hostedtoolcache/Java_Zulu_jdk/6.0.119-119/x64/bin/java' '-javaagent:/home/runner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/jacoco.exec' '-jar' '/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/surefire/surefirebooter-20231102140051486_3.jar' '/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/surefire' '2023-11-02T14-00-51_282-jvmRun1' 'surefire-20231102140051486_1tmp' 'surefire_0-20231102140051486_2tmp' Error: Error occurred in starting fork, check output in log Error: Process Exit Code: 1 Error: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Error: Command was /bin/sh -c cd '/home/runner/work/jaguar2/jaguar2/jaguar2-api' && '/opt/hostedtoolcache/Java_Zulu_jdk/6.0.119-119/x64/bin/java' '-javaagent:/home/runner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/jacoco.exec' '-jar' '/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/surefire/surefirebooter-20231102140051486_3.jar' '/home/runner/work/jaguar2/jaguar2/jaguar2-api/target/surefire' '2023-11-02T14-00-51_282-jvmRun1' 'surefire-20231102140051486_1tmp' 'surefire_0-20231102140051486_2tmp' Error: Error occurred in starting fork, check output in log Error: Process Exit Code: 1 Error: at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:643) Error: at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285) Error: at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250) Error: at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1203) Error: at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1055) Error: at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:871) Error: at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75) Error: at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162) Error: at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) Error: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159) Error: at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) Error: at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) Error: at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) Error: at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) Error: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) Error: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) Error: at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) Error: at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906) Error: at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) Error: at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) Error: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error: at java.lang.reflect.Method.invoke(Method.java:498) Error: at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283) Error: at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226) Error: at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407) Error: at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348) Error: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Error: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error: at java.lang.reflect.Method.invoke(Method.java:498) Error: at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39) Error: at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122) Error: at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61) ``` Caused by: ``` Error: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/surefire/booter/ForkedBooter : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:648) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:296) at java.net.URLClassLoader.access$000(URLClassLoader.java:69) at java.net.URLClassLoader$1.run(URLClassLoader.java:231) at java.net.URLClassLoader$1.run(URLClassLoader.java:225) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:224) at java.lang.ClassLoader.loadClass(ClassLoader.java:325) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:270) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:406) ``` Also there is a possible bug happening with some JDK vendors, Temurin in my case. The same error is not happening with Zulu JDK: See: #72 See: #69 (comment) In this case the error is: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project jaguar2-example-junit4-ba-dua: [ERROR] [ERROR] Please refer to /Users/raraujo/dev/repos/saeg/jaguar2/jaguar2-examples/jaguar2-example-junit4-ba-dua/target/surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] There was an error in the forked process [ERROR] Error occurred in starting fork, check output in log [ERROR] StackMapTable format error: bad offset for Uninitialized in method 'java.lang.String org.apache.maven.surefire.shared.lang3.StringUtils.normalizeSpace(java.lang.String)' [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process [ERROR] Error occurred in starting fork, check output in log [ERROR] StackMapTable format error: bad offset for Uninitialized in method 'java.lang.String org.apache.maven.surefire.shared.lang3.StringUtils.normalizeSpace(java.lang.String)' [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:628) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1203) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1055) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:871) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162) [ERROR] at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39) [ERROR] at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122) [ERROR] at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61) [ERROR] ``` Revert "Upgrade Maven Surefire Plugin 2.12.4 -> 3.1.2" This reverts commit a7fba58. and then, upgrade the plugin 2.12.4 -> 2.22.2. I'll stay on 2.22.2 (basically no major changes) until I can fix both issues.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build failing after upgrade Maven Surefire Plugin to version 3.1.2
(this is not a integration problem of Jaguar 2 and Maven Surefire Plugin, it's a problem to building Jaguar 2)
Error message when building with JDK toolchains 6 and 7:
Caused by:
For Java >= 8 the error is only in the validations:
Probably because the output changed when compared with Surefire output generated by older version (2.12.4).
Originally posted by @andrioli in #69 (comment)
The text was updated successfully, but these errors were encountered: