Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Troubles with SureFire plugin: -"The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? " [duplicate]

While running of unit tests following exception occurs:

org.apache.maven.lifecycle.LifecycleExecutionException: 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 ?
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Any suggestions?

like image 588
johnny-b-goode Avatar asked Sep 25 '12 15:09

johnny-b-goode


1 Answers

Any suggestions?

The exception's error message probably explains what is going on. One of your unit tests has either

  • called System.exit(), or
  • broken the unit test harness, or
  • done something that has crashed the JVM in which it was running.

We cannot tell you which it was.

(I imagine that the problem is being reported because the maven JVM was expecting the child JVM to write the unit test results to its standard output. What it got back from the child was missing the message (or whatever) that said that the unit tests had finished. It is possible that the root cause might be different from the alternatives suggested, but I doubt it, and it is pointless speculating ...)

There is possibly more information in the logfile for the offending unit test. Check that / them.

like image 66
Stephen C Avatar answered Oct 05 '22 08:10

Stephen C