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.
java.lang.AssertionError at org.netbeans.modules.junit.output.RootNodeChildren.displayReport(RootNodeChildren.java:80) at org.netbeans.modules.junit.output.RootNode.displayReport(RootNode.java:98) at org.netbeans.modules.junit.output.ResultPanelTree.displayReport(ResultPanelTree.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) [catch] at org.netbeans.modules.junit.output.ResultDisplayHandler$1.run(ResultDisplayHandler.java:317) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) java.lang.AssertionError at org.netbeans.modules.junit.output.RootNodeChildren.displaySuiteRunning(RootNodeChildren.java:72) at org.netbeans.modules.junit.output.RootNode.displaySuiteRunning(RootNode.java:86) at org.netbeans.modules.junit.output.ResultPanelTree.displaySuiteRunning(ResultPanelTree.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) [catch] at org.netbeans.modules.junit.output.ResultDisplayHandler$1.run(ResultDisplayHandler.java:317) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I have a fix prepared.
Fixed in the trunk. The cause was that when XML output to the standard output is used in the <junit> task, name of the running testsuite is unknown until the testsuite finishes. This case (the anonymousness of a testsuite) was not handled properly by the code responsible for updating the results tree. Modified files: junit/src/org/netbeans/modules/junit/output/: RootNodeChildren.java (1.3) ResultDisplayHandler.java (1.4) JUnitOutputReader.java (1.20) RootNode.java (1.3) TestsuiteNode.java (1.3) ResultPanelTree.java (1.8) Manager.java (1.11) Diffs: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/RootNodeChildren.java?r1=1.2&r2=1.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultDisplayHandler.java?r1=1.3&r2=1.4&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.19&r2=1.20&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/RootNode.java?r1=1.2&r2=1.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java?r1=1.2&r2=1.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultPanelTree.java?r1=1.7&r2=1.8&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.10&r2=1.11&diff_format=u
*** Issue 77327 has been marked as a duplicate of this issue. ***
*** Issue 77759 has been marked as a duplicate of this issue. ***
*** Issue 80020 has been marked as a duplicate of this issue. ***
Verified inside trunk. --------------- NetBeans IDE Dev (Build 200607171800) 1.6.0-rc; Java HotSpot(TM) Server VM 1.6.0-rc-b90 Linux version 2.6.12-1.1390_FC4smp running on i386 en_US (nb); UTF-8
*** Issue 80744 has been marked as a duplicate of this issue. ***
*** Issue 82201 has been marked as a duplicate of this issue. ***
The committed change of class TestsuiteNode.java contains a bug in a newly introduced assertion statement. It lead to bug #80461 ("Show All Errors/Show Failures button breaks Junit results window") which was fixed by fixing the assertion statement (fixed in rev. 1.5). When porting this bug to another branch(es), do not forget to commit the additional fix. Diff: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java?r1=1.4&r2=1.5&diff_format=u
Marking as 5.5_candidate, along with issue 80461.
*** Issue 84009 has been marked as a duplicate of this issue. ***
Created attachment 33593 [details] source code patch for branch 'release55'
Created attachment 33594 [details] reduced source code patch for branch 'release55'
I have attached a source code patch for branch 'release55'. Because most of the modifications are made in comments, I also attached a reduced diff which does not mention changed in comments - it should be used for review of the planned changes but it should not be applied to the source code!
Created attachment 33600 [details] binary patch for branch 'release55'
I have attached a binary patch for branch 'release55'. It should be applicable to the recent builds of NetBeans 5.5. To apply the patch, put the attached .jar file to subdirectory "ide7/modules/patches/org-netbeans-modules-junit/" of the NetBeans installation directory and (re)start NetBeans. (Note: Subdirectory "patches" may not exist - in this case, you will have to create it.)
After applying the binary patch to today 5.5dev build, I'm getting following NPE while testing j2se projects: java.lang.NullPointerException at org.netbeans.modules.junit.output.TestsuiteNode.displayReport(TestsuiteNode.java:80) at org.netbeans.modules.junit.output.RootNodeChildren.displayReport(RootNodeChildren.java:111) at org.netbeans.modules.junit.output.RootNode.displayReport(RootNode.java:110) at org.netbeans.modules.junit.output.ResultPanelTree.displayReport(ResultPanelTree.java:191) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... (whole stack trace attached) -- Product Version = NetBeans 5.5 Dev (Build 200609050000) Operating System = Linux version 2.6.12-1.1390_FC4smp running on i386 Java; VM; Vendor; Home = 1.5.0_05; Java HotSpot(TM) Server VM 1.5.0_05-b05; Sun Microsystems Inc.; /usr/jdk1.5.0_05/jre System Locale; Encoding = en_US (nb); UTF-8 Module patch or custom extension: /space/netbeans-5.5dev/ide7/modules/patches/org-netbeans-modules-junit/binary-patch-73541-release55.jar
Created attachment 33603 [details] NPE stack trace
The same behaviour after installing the patch onto: Product Version = NetBeans 5.5 Dev (Build 200609070000) Operating System = SunOS version 5.11 running on x86 Java; VM; Vendor; Home = 1.5.0_08; Java HotSpot(TM) Client VM 1.5.0_08-b03; Sun Microsystems Inc.; /opt/jdk1.5.0_08/jre
Since the bug still occurs in today's nightly build (it was promised to be fixed there -- please see bug #84009) I am reopening the issue.
I can confirm that with latest daily build I still experience the bug.
Please proceed with the fix, I have apparently confused this issue with issue 82201. The patch works ok for XML formatter (no assertion). --- Product Version = NetBeans 5.5 Dev (Build 200609040000) Operating System = SunOS version 5.10 running on sparcv9 Java; VM; Vendor; Home = 1.5.0_09-ea; Java HotSpot(TM) 64-Bit Server VM 1.5.0_09-ea-b01; Sun Microsystems Inc.; /usr/jdk1.5.0_09/jre System Locale; Encoding = en (nb); ISO646-US binary-patch-73541-release55.jar
Committed to branch 'release55'. Modified files: junit/src/org/netbeans/modules/junit/output/: JUnitOutputReader.java (1.6.4.2.2.3) Manager.java (1.2.4.2.2.2) ResultDisplayHandler.java (1.3.4.1.2.2) ResultPanelTree.java (1.1.4.1.2.2) RootNode.java (1.2.4.1.2.2) RootNodeChildren.java (1.2.4.1.2.2) TestsuiteNode.java (1.2.4.1.2.2) Diffs: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.6.4.2.2.2&r2=1.6.4.2.2.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.2.4.2.2.1&r2=1.2.4.2.2.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultDisplayHandler.java?r1=1.3.4.1.2.1&r2=1.3.4.1.2.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/ResultPanelTree.java?r1=1.1.4.1.2.1&r2=1.1.4.1.2.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/RootNode.java?r1=1.2.4.1.2.1&r2=1.2.4.1.2.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/RootNodeChildren.java?r1=1.2.4.1.2.1&r2=1.2.4.1.2.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java?r1=1.2.4.1.2.1&r2=1.2.4.1.2.2&diff_format=u
Null pointer exception thrown when running junit tests of wsit project on the latest build (9/12) (please see the bug #84009), thus reopening the issue. Will also attach my [message.log]
Created attachment 33879 [details] messages.log
I still get this NPE exception which makes it impossible to see the full test report thus the development is significantly hindered (you have to run those tests manually from CMD line and setup your own external reporting mechanism). IMHO, this is a P1 issue. Attaching the messages.log file.
Created attachment 34220 [details] Zipped log file with the exception
kaos, I assume you are encountering the bug described in issue #82201 ("Printing an XML header in a junit test causes an assertion"). Please try to apply the binary patch for it: 1) Download the binary patch (http://www.netbeans.org/nonav/issues/showattachment.cgi/34287/binary-patch-82201-release55.jar) 2) Apply the patch - put the downloaded .jar file into subdirectory ide7/modules/patches/org-netbeans-modules-junit of your NetBeans 5.5 installation directory. (Most probably you will have to create the subdirectory.) 3) (Re)start NetBeans 5.5 and try if you can still reproduce this bug.
binary-patch-82201-release55.jar helped! Thanks a lot! no pop-up window anymore :-) all the tests processed Is there any chance to have the patch integrated into nightly builds?
There is a chance.
In branch 'release55_dev', the blocking bug #82201 is now fixed - it implies that this bug is fixed, too. Marking as FIXED. It will be marked as VERIFIED once it is integrated to and tested in branch 'release55'.
I have committed the patch for bug #82201 to branch 'release55', too. So the next daily build should have this bug fixed.
Great, thanks! It is working fine now (nightly build 5.5dev, 2006/09/25).
Verified. --- Product Version = NetBeans 5.5 Dev (Build 200609250000) Operating System = SunOS version 5.10 running on sparc Java; VM; Vendor; Home = 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99; Sun Microsystems Inc.; /usr/jdk1.6.0/jre System Locale; Encoding = en (nb); ISO646-US