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 108864 - NPE when opening sun-web.xml
Summary: NPE when opening sun-web.xml
Status: RESOLVED DUPLICATE of bug 101619
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-04 13:21 UTC by Milos Kleint
Modified: 2007-07-05 20:19 UTC (History)
0 users

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 Milos Kleint 2007-07-04 13:21:00 UTC
using 5.5.1 on linux, jdk 1.5

Steps to reproduce:
1. start IDE, add a glassfish/app server instance in Server Manager
2. create a Web project and associate it with the created app server instance.
3. remove the app server instance in Server manager
4. restart IDE, it complains about wrong reference to server. Ignore that for now.
5. find the sun-web.xml file in Configuration files and double-click on it. results in the exception below.

While the project is obviously in an invalid state, one should not have DataObjects and the visual representation in the
IDE tied to the project state. Or at least it shall fail gracefully, nto with exception.

java.lang.NullPointerException
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject.getStorage(ConfigDataObject.java:347)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject.findOpenedConfigEditor(ConfigDataObject.java:648)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject$2.run(ConfigDataObject.java:221)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1178)
	at org.openide.util.Mutex.readAccess(Mutex.java:215)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject.isConfigEditorOpened(ConfigDataObject.java:219)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject.getEditCookie(ConfigDataObject.java:271)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject._getEditCookie(ConfigDataObject.java:260)
	at org.netbeans.modules.j2ee.sun.share.config.ConfigDataObject.getCookie(ConfigDataObject.java:289)
	at org.netbeans.modules.xml.text.navigator.NavigatorContent.navigate(NavigatorContent.java:138)
	at org.netbeans.modules.xml.text.navigator.XMLNavigatorPanel.navigate(XMLNavigatorPanel.java:82)
	at org.netbeans.modules.xml.text.navigator.XMLNavigatorPanel$1.resultChanged(XMLNavigatorPanel.java:43)
	at org.netbeans.modules.xml.text.navigator.XMLNavigatorPanel.panelActivated(XMLNavigatorPanel.java:70)
	at org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:229)
	at org.netbeans.modules.navigator.NavigatorController.access$600(NavigatorController.java:62)
[catch] at org.netbeans.modules.navigator.NavigatorController$ActNodeSetter.run(NavigatorController.java:388)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	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 Milos Kleint 2007-07-04 13:22:11 UTC
oh, and I haven't tested with 6.0, just 5.5.1.
Comment 2 _ pcw 2007-07-05 20:19:06 UTC
This issue affects 5.5.1 (and probably 5.5) only.  It does not affect 6.0.

Visual state of the configuration editor is tied to the server because of JSR-88.  That is why it is managed by the
configuration object.

But this NPE is just a bug.  It is trivial to fix and was identified when 5.5 was in high resistence mode.

*** This issue has been marked as a duplicate of 101619 ***