I have a java junit test that passes when run alone on a development machine. We also have a hudson job which runs all the tests, invoked via ant, on a Mac OS X 10.4 node wi
For us, it was actually that we by accident (used a newer version of eclipse) started to use Ant 1.7.x instead of our old ant version which was compatible with our Weblogic 8.1/JDK 1.4.x environment. We fixed this by changing back the Ant Home in Eclipse->Windows->Preferences->Ant->Runtime to our old version of Ant.
Regards Klas
I faced the problem after reinstalling a new version of NetBeans to an external hard disk, upgrading Junit at the same time and using my old workspace.
For me the solution to the same problem was simple:
Just add the JUnit-Library to project properties
=> Libraries
=> Compile Tests
and Run Tests
.
So, in my case, it was just a missing library or a JUnit version conflict.
In my case it's an uncaught exception in a static initializer/method/block inside a class.
Specifically I had one class calling a static method in another class and it was triggering a NumberFormatException.
BTW adding "showoutput=true" to the task in build.xml did not help troubleshoot. Since the static block is one of the first things to run, the JVM was blowing up before it could output anything at all.
I faced a similar issue. I ran the junit tests as an ant task. I added the showoutput="yes" ant junit property and ran the ant junit task. It then showed the exception stack trace that caused the forked jvm to exit.
I solved my issue by setting the following environment variable:
Variable: _JAVA_OPTIONS Value: -Xms128m -Xmx512m