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.

Bug 70193 - NullPointer Exception When Deploying to Glassfish
Summary: NullPointer Exception When Deploying to Glassfish
Status: RESOLVED DUPLICATE of bug 73797
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords: RANDOM
: 70696 73982 74108 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-10 17:15 UTC by umeshajb
Modified: 2006-07-28 11:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description umeshajb 2005-12-10 17:15:42 UTC
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)
Comment 1 Sherold Dev 2006-01-06 09:54:24 UTC
*** Issue 70696 has been marked as a duplicate of this issue. ***
Comment 2 Sherold Dev 2006-01-06 13:18:28 UTC
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
Comment 3 Jesse Glick 2006-01-06 21:40:46 UTC
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
Comment 4 Sherold Dev 2006-03-27 14:42:52 UTC
*** Issue 73982 has been marked as a duplicate of this issue. ***
Comment 5 Sherold Dev 2006-03-27 17:18:09 UTC
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.
Comment 6 Sherold Dev 2006-04-28 10:37:32 UTC

*** This issue has been marked as a duplicate of 73797 ***
Comment 7 Sherold Dev 2006-07-28 11:13:12 UTC
*** Issue 74108 has been marked as a duplicate of this issue. ***