It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Fatal error during mvn package even though unit tests are successful. Help please! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Fatal error during mvn package even though unit tests are successful. Help please!" Watch "Fatal error during mvn package even though unit tests are successful. Help please!" New topic
Author

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

Selin Ebeci
Greenhorn

Joined: Dec 17, 2009
Posts: 5
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 ?


[Download out.bmp] Download

[Download pom.bmp] Download

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

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()...)


JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Selin Ebeci
Greenhorn

Joined: Dec 17, 2009
Posts: 5
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

Joined: May 14, 2008
Posts: 5827
    
    7

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

Joined: Dec 17, 2009
Posts: 5
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.


[Download out.bmp] Download

Selin Ebeci
Greenhorn

Joined: Dec 17, 2009
Posts: 5
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

Joined: May 14, 2008
Posts: 5827
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fatal error during mvn package even though unit tests are successful. Help please!