gerbenfeenstra
2011-05-11 10:21:23 UTC
I'm working on a multi-module project using maven. When running all the tests for a module by right-clicking on the module and choose "test" (or building the whole project) testing finishes flawlessly. But when running a test separately I get this nasty exception for which I can't seem to find a solution on the net:
Code:
Testcase: my.test.class.java:null: Caused an ERROR
Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
The few solutions I found in the internet (and tried) are:
- Eliminate the existence of any System.exit(0) calls (Which aren't present in our project in the first place)
- Set forkMode=once as a property of my project/module
- I've read somewhere the exception probably has an underlying problem like shortage of memory. So I tried increasing permsize and Xmx by passing "-Xmx512m -XX:MaxPermSize=512m" in MAVEN_OPTS environment variable. I also tried monitoring memory-usage with the JConsole, there is a spike when running the test, but nowhere near the maximum.
I am using Netbeans 7.0 RC2 (also tried 6.9) in conjunction with Java jdk1.6.0_24 which I reinstalled as well, tried x32 and x64 version. My hardware is more then sufficient and I have loads of memory on different machines (4 and 8GB). It fails on any test within our project if I run it seperately, also in debug test mode (Which is my main concern, debugging a test is impossible in this situation).
When creating a new project with a dummytest it succeeds, which led me to believe the problem is caused somewhere within our project or its settings rather then any java/maven settings.
Does anyone have any idea how to solve this problem? Did I miss something? Can I find a log somewhere which gives me some more info?
Code:
Testcase: my.test.class.java:null: Caused an ERROR
Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
The few solutions I found in the internet (and tried) are:
- Eliminate the existence of any System.exit(0) calls (Which aren't present in our project in the first place)
- Set forkMode=once as a property of my project/module
- I've read somewhere the exception probably has an underlying problem like shortage of memory. So I tried increasing permsize and Xmx by passing "-Xmx512m -XX:MaxPermSize=512m" in MAVEN_OPTS environment variable. I also tried monitoring memory-usage with the JConsole, there is a spike when running the test, but nowhere near the maximum.
I am using Netbeans 7.0 RC2 (also tried 6.9) in conjunction with Java jdk1.6.0_24 which I reinstalled as well, tried x32 and x64 version. My hardware is more then sufficient and I have loads of memory on different machines (4 and 8GB). It fails on any test within our project if I run it seperately, also in debug test mode (Which is my main concern, debugging a test is impossible in this situation).
When creating a new project with a dummytest it succeeds, which led me to believe the problem is caused somewhere within our project or its settings rather then any java/maven settings.
Does anyone have any idea how to solve this problem? Did I miss something? Can I find a log somewhere which gives me some more info?