Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fatal error during mvn package even though unit tests are successful. Help please!

 
Selin Ebeci
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to create an installation package in a specific structure using maven but I am getting an unexpected error.
Although all my unit tests are successful, I get a fatal error in the end. Maven log and my war pom file that I've recently changed are attached.(I suspect that the pom file is causing the problem but I am not sure.)

Your help will be truly appreciated.

Many thanks in advance!
Selin Ebeci

Results :

Tests run: 47, Failures: 0, Errors: 0, Skipped: 2

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
Filename: out.bmp
Description: Maven out log.(log extension)
File size: 62 Kbytes
[Download out.bmp] Download Attachment
Filename: pom.bmp
Description: War pom file(xml extension)
File size: 4 Kbytes
[Download pom.bmp] Download Attachment
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, that's a new one to me. Try running with mvn with -X and see if it provides any additional information. (I assume that none of your tests are calling System.exit()...)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your uploaded files are marked as being in Microsoft BMP (graphics) format, even though they are actually text files.

I think if the JVM had crashed, there would have been more information, but the offending component was the Surefire test system, and that's an old friend of Maven's that has never done anything like that to me. I didn't look at the POM, but it would probably be worth googling for other people reporting the same problem.
 
Selin Ebeci
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

-X doesn't bring any extra logs unfortunately. I still deal with the same issue. Any other suggestions?

Peter Johnson wrote:Wow, that's a new one to me. Try running with mvn with -X and see if it provides any additional information. (I assume that none of your tests are calling System.exit()...)
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, capture the full mvn output when you used -X and attach that output to the post.

The other thing I would try is to remove unit test classes one a a time until the mvn build doesn't fail. It could very well be that one of the tests is causing this issue and by removing them one at a time, you should be able to identify the bad test class. Once you have the test class identified, do the same with the test methods.
 
Selin Ebeci
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I am going to try that now. Log(-X command) is attached. Thanks!

Peter Johnson wrote:Yes, capture the full mvn output when you used -X and attach that output to the post.

The other thing I would try is to remove unit test classes one a a time until the mvn build doesn't fail. It could very well be that one of the tests is causing this issue and by removing them one at a time, you should be able to identify the bad test class. Once you have the test class identified, do the same with the test methods.
Filename: out.bmp
Description: log with -X
File size: 336 Kbytes
[Download out.bmp] Download Attachment
 
Selin Ebeci
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Finally I was able to solve the problem by changing the surefire version. I believe it is a bug of surefire which was fixed at later versions. Here is the change:

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<systemPropertyVariables>
<log4j.configuration>log4j-test.properties</log4j.configuration>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Making sure you are using the latest version of a plugin is always a good idea. You should periodically run the display-plugin-updates goal for the Version plugin (http://mojo.codehaus.org/versions-maven-plugin/display-plugin-updates-mojo.html) to see if you are using the latest plugins.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic