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.
I was using the December 8th daily build (netbeans-javaee5-daily-bin-200512082300-8_Dec_2005_2300) of the Java EE 5 version and got a nullpointer exception when I deployed to the glassfish server (glassfish-installer-9.0-b30). The log follows: *********** Exception occurred ************ at 6:11 AM on Dec 10, 2005 java.lang.NullPointerException at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2006) at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2058) at org.apache.tools.ant.Project.log(Project.java:367) at org.apache.tools.ant.Task.log(Task.java:346) at org.apache.tools.ant.Task.log(Task.java:334) at org.netbeans.modules.j2ee.deployment.impl.ui.ProgressUI.log(ProgressUI.java:166) at org.netbeans.modules.j2ee.deployment.impl.ui.ProgressUI.progress(ProgressUI.java:115) at org.netbeans.modules.j2ee.deployment.impl.ui.ProgressUI.progress(ProgressUI.java:115) at org.netbeans.modules.j2ee.deployment.impl.ui.ProgressUI.handleProgressEvent(ProgressUI.java:215) at com.sun.enterprise.deployapi.ProgressObjectSink.handleProgressEvent(ProgressObjectSink.java:191) at com.sun.enterprise.deployapi.ProgressObjectImpl.fireProgressEvent(ProgressObjectImpl.java:390) at com.sun.enterprise.deployapi.ProgressObjectImpl.fireProgressEvent(ProgressObjectImpl.java:418) at com.sun.enterprise.deployapi.ProgressObjectImpl.setupForNormalExit(ProgressObjectImpl.java:515) at com.sun.enterprise.deployment.client.ChangeStateAction.run(ChangeStateAction.java:104) [catch] at java.lang.Thread.run(Thread.java:595)
*** Issue 70696 has been marked as a duplicate of this issue. ***
Even if this was reported to happen on the javaee5 branch, the same was reported to happen on the trunk build as well. This issue seems to happen only rarely with no reproduction steps -> marking as RANDOM The NPE comes from Ant, I've checked the Ant 1.6.5 sources but I can't see any way how the NPE could occur, probably my ant sources do not match the real classes. Jesse, do you have any idea what could be the problem? Thanks
The symptom is identical to that in issue #69727, and the symptom is already fixed (or worked around, if you prefer) in the trunk. But the root cause is almost certainly a logic error in some custom Ant task being run by the deployment (which may have serious consequences such as memory leaks even if the NPE symptom is not present). I would search sources for your custom Ant tasks for any static fields which might be keeping stale references to an o.a.t.a.Project. For more background see http://jira.jayasoft.org/browse/IVY-115
*** Issue 73982 has been marked as a duplicate of this issue. ***
I've temporarily added a code that catches this annoying exception. Checking in src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java,v <-- ProgressUI.java new revision: 1.15.6.2.2.1; previous revision: 1.15.6.2 done The problem seems to be that the Ant target finishes before all the messages are written into the log. The nonstatic fields in the Project are then immediately nulled out and therefore the NPE after the next Project.log() call. This should be hopefully easily fixable.
*** This issue has been marked as a duplicate of 73797 ***
*** Issue 74108 has been marked as a duplicate of this issue. ***