This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 7.2 RC1 (Build 201206272359) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_05 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.1-b03 ---------------------- When I run test (ALT+F6) on an EJB Module, it is failing: "caused an ERROR: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until VM exit." This error only happens if there is an Entity class (with Persistence.xml) and a Session Bean inside the EJB module and test file is using the EJBContainer. Below is the output during the test: ant -f C:\\Users\\Username\\Documents\\NetBeansProjects\\EJBModule1 -Dignore.failing.tests=true -Dnb.wait.for.caches=true test init: deps-jar: compile: compile-test: Error: Could not find or load main class ${run.jvmargs.ide} Testsuite: ejb.NewSessionBeanTest Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec Testcase: ejb.NewSessionBeanTest: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:153) Test ejb.NewSessionBeanTest FAILED (crashed) test-report: test: BUILD SUCCESSFUL (total time: 1 second)
I had this problem with 7.2 also. At first I edited build-impl.xml, changing all the junit tasks to 'fork="false"'. While this worked, it would also reset to true whenever I changed project properties. One of the errors in the output window mentioned not finding JUnit annotations. After reading further through build-impl.xml I found some conditions looking for junit+testng. On a whim I added TestNG to Libraries>Test Compile. Problem solved.
I can confirm that adding the TestNG library to the Test Libraries fixed the issue.
I got the same error with NB 7.2. Adding the TestNG library doesn't work in this case because the test is part of a Spring based project where all the test suite is built around the Spring + JUnit-4.4 framework and including the TestNG introduces new errors. Please consider raising the priority to the higher value. Development activities on all our Spring based EJB projects are virtually stopped by several randomly scattered tests failing ! Providing a testcase is very complex and I will try to do this only if really needed. Pleas let me know how I can help. This is the (not very useful !) output of the test run: --- Errore: impossibile trovare o caricare la classe principale ${run.jvmargs.ide} (N.B.: this is the italian version of the error "Could not find or load main class ${run.jvmargs.ide}) Testsuite: it.mate.iside.model.JpaPuTest Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec Testcase: it.mate.iside.model.JpaPuTest: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:153) Test it.mate.iside.model.JpaPuTest FAILED (crashed)
Created attachment 124818 [details] Output of the failing test. Ant verbose mode set to 'verbose'
I am not sure but this bug is someway related to the bugs 216586 and 166379. The suggestion given by Johan here: http://netbeans.org/bugzilla/show_bug.cgi?id=166379#c18 works ! ( Define the property <property name="run.jvmargs.ide" value=""/> in the file build.xml )
If this is the case then it was solved by: http://hg.netbeans.org/main-silver/rev/df77a63521e7 Please try with the latest build and reopen if this is not fixed. Thank you