请帮我解决这个问题。我不太明白日志中的错误是什么意思。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.749s
[INFO] Finished at: Thu Apr 24 10:10:20 IST 2014
[INFO] Final Memory: 15M/37M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test (default-test) on project samples.simpleforwarding: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command wascmd.exe /X /C ""C:\Program Files\Java\jdk1.7.0_55\jre\bin\java" -Xmx1024m -XX:MaxPermSize=256m -jar E:\OpenDayLight\controller\opendaylight\samples\simpleforwarding\target\surefire\surefirebooter53410321571238933.jar E:\OpenDayLight\controller\opendaylight\samples\simpleforwarding\target\surefire\surefire86076271125218001tmp E:\OpenDayLight\controller\opendaylight\samples\simpleforwarding\target\surefire\surefire_01846991116135903536tmp"
[ERROR] -> [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/PluginExecutionException
也面临着同样的问题,ubuntu上的java 8
然后发现https://stackoverflow.com/a/53016532/1676516
这似乎是最近在java 8的surefire插件2.22.1版本https://issues.apache.org/jira/browse/SUREFIRE-1588中的一个错误
通过本地MVN设置~/.m2/ Settings .xml遵循建议的解决方案
<profiles>
<profile>
<id>SUREFIRE-1588</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</properties>
</profile>
</profiles>
我在MacOS上远程调试端口5005上的Selenium测试代码时也遇到了这个问题。这个问题原来是由一个仍然运行的剩余的surefire-fork jvm引起的。Eclipse IDE终端的日志输出没有显示底层问题“Address already in use”。只有当我在MacOS终端上运行Eclipse实际试图运行的相同命令时,才会显示日志消息:
/bin/sh -c cd /path/to/your/project/directory && /Library/Java/JavaVirtualMachines/adoptopenjdk-8.使用实例jdk/Contents/Home/jre/bin/java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -jar /path/to/target/surefire/surefirebooter230340673926465933.jar /path/to/target/surefire 2019-06-28T10-50-02_140-jvmRun1 surefire6455775580414993159tmp surefire_02461993428448591420tmp
杀死流氓JVM实例(在Activity Monitor中查找java进程名)解决了这个问题。顺便说一下,我正在运行surefire插件版本2.21.0,与开放jdk 8 (v1.8.0_212)没有问题。注意,所有路径都将特定于您的构建环境,可能还有端口(address=5005)。
在JDK 1.8.0_65上使用Jacoco插件运行mvn命令时有类似的问题
[INFO]
A fatal error has been detected by the Java Runtime Environment:
JRE version: Java(TM) SE Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17).........
Problematic frame:
PhaseIdealLoop::build_loop_late_post(Node*)+0x144
............
............
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
JDK https://bugs.openjdk.java.net/browse/JDK-8081379中有一个bug
解决方案是使用参数-XX:-UseLoopPredicate运行mvn clean install
或者只是对JDK进行更新(我认为更新的小版本也可以)