SurefireThe forked VM terminated without properly saying goodbye. VM crash or System.exit called?

最近的一個項目 install的時候,插件報錯了

WARNING] Tests run: 571, Failures: 0, Errors: 0, Skipped: 6
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  32:02 min
[INFO] Finished at: 2021-10-22T13:05:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project c-connect-digital-sa-bis: There are test failures.
[ERROR] 
[ERROR] Please refer to C:\oumin\code\git\merge\sa\c-connect-digital-sa-bis\target\surefire-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] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\swdtools\JDK1.8.0_66-X64\jre\bin\java -javaagent:C:\\Users\\45188084\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.9\\org.jacoco.agent-0.7.9-runtime.jar=destfile=C:\\oumin\\code\\git\\merge\\sa\\cmb-connect-digital-sa-bis\\target\\jacoco.exec -jar C:\oumin\code\git\merge\sa\cm-connect-digital-sa-bis\target\surefire\surefirebooter9014505173437654363.jar C:\oumin\code\git\merge\sa\c-connect-digital-sa-bis\target\surefire 2021-10-22T12-34-58_043-jvmRun1 surefire645226529938309253tmp surefire_06353460361936558016tmp"
[ERROR] Process Exit Code: 0
[ERROR] Crashed tests:
[ERROR] com.hsbc.dtc.connect.transformation.util.BisKsmServiceUtilTest
[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:\swdtools\JDK1.8.0_66-X64\jre\bin\java -javaagent:C:\\Users\\45188084\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.9\\org.jacoco.agent-0.7.9-runtime.jar=destfile=C:\\oumin\\code\\git\\merge\\sa\\cmb-connect-digital-sa-bis\\target\\jacoco.exec -jar C:\oumin\code\git\merge\sa\cmb-connect-digital-sa-bis\target\surefire\surefirebooter9014505173437654363.jar C:\oumin\code\git\merge\sa\cmb-connect-digital-sa-bis\target\surefire 2021-10-22T12-34-58_043-jvmRun1 surefire645226529938309253tmp surefire_06353460361936558016tmp"
[ERROR] Process Exit Code: 0

每次執行知是要30分鐘,而且 其他同事的電腦 install 是成功的。 這就比較奇怪了,不能放着不解決啊。

就這個項目不行,其他項目 install 沒有問題的。 非常奇怪

解決辦法

參考: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi

開始試了各種方式都不行。

Thanks for this, using maven:3.6.0-jdk-10 Docker image and upgrading to version 3.0.0-M3 of maven-surefire-plugin resolved for me as well. 

後來發現我的maven 版本是 3.6 的,而其他同事版本不一樣。而項目默認  版本:

maven-surefire-plugin 版本是 2.20

升級版本

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <!--                <configuration>-->
                <!--                    <forkCount>3</forkCount>-->
                <!--                    <reuseForks>true</reuseForks>-->
                <!--                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>-->
                <!--                    <testFailureIgnore>true</testFailureIgnore>-->
                <!--                </configuration>-->
                <version>3.0.0-M5</version>
            </plugin>

再次重試解決

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章