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 94897 - Deleting a WSDL component then invoking Save throws NPE
Summary: Deleting a WSDL component then invoking Save throws NPE
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: WSDL Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 22:31 UTC by pvarghese
Modified: 2007-02-19 07:39 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 pvarghese 2007-02-07 22:31:48 UTC
deleting a Query from a propertyalias extensibiltiy element in the WSDL editor 
and then saving the document throws NullPointerException

Steps to reproduce:

1. Create a new WSDL document.
2. create a message element on a schema element.
3. create a property extensibilty element on one of the nodes of the message. 
4. define a propertyalias for the property element and the message defined.
5. create a query element for the created propertyalias and save the document.
6. delete the query element and save the document again.

The follwoind NullPointerException is thrown

java.lang.NullPointerException
	at 
org.netbeans.modules.xml.wsdl.ui.view.treeeditor.WSDLElementNode$SaveCookieDele
gate.save(WSDLElementNode.java:667)
	at org.openide.actions.SaveAction.performAction(SaveAction.java:57)
	at org.openide.util.actions.NodeAction$DelegateAction$1.run
(NodeAction.java:537)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction
(ActionsBridge.java:53)
	at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed
(NodeAction.java:533)
	at org.openide.windows.TopComponent.processKeyBinding
(TopComponent.java:880)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2809)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
	at java.awt.Component.processEvent(Component.java:5265)
	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.KeyboardFocusManager.redispatchEvent
(KeyboardFocusManager.java:1810)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent
(DefaultKeyboardFocusManager.java:672)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent
(DefaultKeyboardFocusManager.java:920)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions
(DefaultKeyboardFocusManager.java:798)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent
(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1778)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	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 Nathan Fiedler 2007-02-09 23:34:12 UTC
It seems that selecting any node and deleting it, then invoking Save will result
in an NPE. The priority should be raised. BTW, I have a fix for this, but the
problem then becomes, the SaveCookieDelegate will not actually save because the
Node's component is no longer in the model. Need a fool-proof way to get the
DataObject and be able to save the document.
Comment 2 Nathan Fiedler 2007-02-09 23:39:54 UTC
NPE that appears in a dialog is a P1.
Comment 3 Nathan Fiedler 2007-02-09 23:43:59 UTC
Fixed in release551, in that the NPE no longer occurs. However, the Save is
still not successful until the user selects another node. Will enter another
issue for this, with appropriate priority.

wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/treeeditor/WSDLElementNode.java;
new revision: 1.1.2.26.4.9; previous revision: 1.1.2.26.4.8
Comment 4 jlautz 2007-02-18 23:14:39 UTC
Verified on Windows XP with Gavotte 070216_24 and JDK 1.5.0_09 that the scenario
no longer produces an NPE.
Comment 5 Nathan Fiedler 2007-02-19 07:39:22 UTC
The Save issue that I planned on entering turned out to have been entered
already. See issue 94899 for the full description.