请帮我解决这个问题.我不完全理解日志中的错误意味着什么.
[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 …Run Code Online (Sandbox Code Playgroud) 我正在开发一个相当复杂的java项目,它有许多依赖项和许多单元测试.
我在mac(mavericks)上使用java 1.6.0_65,使用maven 3.0.5和maven-surefire-plugin:2.16在几个forks中运行.我的问题是使用多个forks运行此设置会导致fork退出:
"分叉的虚拟机终止了,没有说再见.虚拟机崩溃或System.exit调用?"
只使用一个fork运行它不会产生问题(并且一切都通过)
有一些关于这个问题的信息包括这个StackOverflow问题和这个万无一失的bug(现在似乎已经解决了)
我知道这种情况的"答案"是在我的代码中找到什么叫System.exit() - 我找不到任何东西.
或者是什么原因导致我的JVM崩溃 - 没有hs_pid崩溃报告.
我的问题是我可以用什么样的策略来找到找到这个原因的? 为了澄清,我对上面提到的答案不感兴趣,但是找到它的起源.(或者甚至更好地回答可能造成这种情况的不同答案)
我的Surefire配置是:(但我确实尝试过其他组合)
<parallel>classes</parallel>
<threadCount>1</threadCount>
<forkCount>1C</forkCount>
<reuseForks>false</reuseForks>
<useSystemClassLoader>false</useSystemClassLoader>
<useManifestOnlyJar>true</useManifestOnlyJar>
<useFile>true</useFile>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>alphabetical</runOrder>
Run Code Online (Sandbox Code Playgroud)
在使用--debug(-X)运行maven目标后添加#1添加相关的输出
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project event-logger: ExecutionException; nested exception is java.util.concurrent.ExecutionException: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command was/bin/sh -c cd /Users/nitzan/work/nitzan_5_parallel_tests/event-logger && /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home/bin/java org.apache.maven.surefire.booter.ForkedBooter /Users/nitzan/work/nitzan_5_parallel_tests/event-logger/target/surefire/surefire5107531798951225850tmp /Users/nitzan/work/nitzan_5_parallel_tests/event-logger/target/surefire/surefire_12561116468761732560tmp
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to …Run Code Online (Sandbox Code Playgroud) 我使用Docker和https://github.com/fabric8io/docker-maven-plugin进行集成测试.
在我的Windows 10(更新到Windows 10 1709之后)机器上,我的Maven 3.5.0构建面临以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project api: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Projects\example\api\target\failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire1232565117555778729\surefirebooter3745527118196863348.jar C:\Users\Alexander\AppData\Local\Temp\surefire1232565117555778729 2017-10-19T16-45-23_780-jvmRun1 surefire4633356271541422594tmp surefire_169922891955689988tmp"
[ERROR] Error …Run Code Online (Sandbox Code Playgroud)