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 48950 - NPE in org.apache.tools.ant.Project.fireMessageLoggedEvent
Summary: NPE in org.apache.tools.ant.Project.fireMessageLoggedEvent
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-13 17:29 UTC by _ gtzabari
Modified: 2004-09-14 13:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.65 KB, text/plain)
2004-09-13 19:15 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2004-09-13 17:29:53 UTC
dev build 200409121800
JDK 1.5 RC

Trying to run a webapp on an external Tomcat 5.5
server I get a failure (covered by a separate
issue) but then this exception is thrown:

java.lang.NullPointerException
	at
org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:1940)
	at
org.apache.tools.ant.Project.fireMessageLogged(Project.java:1992)
	at org.apache.tools.ant.Project.log(Project.java:399)
	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.DeployProgressMonitor.log(DeployProgressMonitor.java:442)
	at
org.netbeans.modules.j2ee.deployment.impl.ui.DeployProgressMonitor.addMessage(DeployProgressMonitor.java:398)
	at
org.netbeans.modules.j2ee.deployment.impl.ui.DeployProgressMonitor.cancelCommandBtnActionPerformed(DeployProgressMonitor.java:364)
	at
org.netbeans.modules.j2ee.deployment.impl.ui.DeployProgressMonitor.access$500(DeployProgressMonitor.java:41)
	at
org.netbeans.modules.j2ee.deployment.impl.ui.DeployProgressMonitor$3.actionPerformed(DeployProgressMonitor.java:283)
	at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
	at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
	at
java.awt.Component.processMouseEvent(Component.java:5488)
	at
javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
	at
java.awt.Component.processEvent(Component.java:5253)
	at
java.awt.Container.processEvent(Container.java:1966)
	at
java.awt.Component.dispatchEventImpl(Component.java:3955)
	at
java.awt.Container.dispatchEventImpl(Container.java:2024)
	at
java.awt.Component.dispatchEvent(Component.java:3803)
	at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at
java.awt.Container.dispatchEventImpl(Container.java:2010)
	at
java.awt.Window.dispatchEventImpl(Window.java:1766)
	at
java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jesse Glick 2004-09-13 19:09:29 UTC
Looks to me like something in j2eeserver (or j2eeserver/ant?) is
trying to log a message through Ant's Task.log after a build has
finished. This is not permitted. Probably whatever code set
DeployProgressMonitor.logger to non-null failed to reset it afterwards
using safe techniques (e.g. a finally-block).

Reporter: please attach largish exceptions, logs, etc. using
Issuezilla's attachment feature, rather than pasting them into the
description area.
Comment 2 _ gtzabari 2004-09-13 19:14:15 UTC
Jesse,

Apologies, I'll attach the exception now.
Comment 3 _ gtzabari 2004-09-13 19:15:02 UTC
Created attachment 17592 [details]
Stack trace
Comment 4 Nam Nguyen 2004-09-13 19:34:01 UTC
I checked in the fix last night.  
http://j2eeserver.netbeans.org/source/browse/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/DeployProgressMonitor.java.diff?r1=1.14&r2=1.15
However, it is not as complete fix as the one pointed out by Jesse.  I
will do the reset the logger to null.
Comment 5 Nam Nguyen 2004-09-13 19:59:44 UTC
Fixed in trunk:
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Deployment.java,v
 <--  Deployment.java
new revision: 1.9; previous revision: 1.8
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/DeployProgressMonitor.java,v
 <--  DeployProgressMonitor.java
new revision: 1.16; previous revision: 1.15

Looks like this fix needs to be in beta2?
Comment 6 Pavel Buzek 2004-09-13 20:57:18 UTC
IMO this is more serious then P3, rising priority to P2.

I agree with Nam that this would be good to fix for beta.
Adding Karel to CC to get QA opinion (pls forward to apropriate QA
engineer if needed).
Comment 7 zikmund 2004-09-14 13:09:11 UTC
This bug is not Beta2 problem - it's reproducible in mentioned
200409121800 build, but not in 200409100847 build (promoted Q-build)
from which Beta2 was branched.

Moreover this is reproducible only with external Tomcat 5.5 and not
with external Tomcat 5.0.28. Since Tomcat 5.5 is not supported and
deployment to Tomcat 5.5 fails it seems to me as a minor bug
(decreasing to P3).
Petr Blaha tested it with Sun Application Server and J2EE module and
it works fine on J2eeNetBeans-040914 build.

I'm not aware of any other reasons why it should be more serious. If I
missed something, please let me know. Thanks, Karel.