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 85557 - Create variable of Built-in type throws NPE
Summary: Create variable of Built-in type throws NPE
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: issues@soa
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2006-09-22 14:12 UTC by Maksim Khramov
Modified: 2006-09-25 05:31 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 Maksim Khramov 2006-09-22 14:12:22 UTC
Create BPEL project
Add new Diagram
Invoke Add Variable command.
Type variable name and select any Built-In type.
Click OK.
The NPE is thrown:
java.lang.NullPointerException
	at
org.netbeans.modules.bpel.properties.ImportRegistrationHelper.createImport(ImportRegistrationHelper.java:120)
	at
org.netbeans.modules.bpel.properties.ImportRegistrationHelper.createImport(ImportRegistrationHelper.java:116)
	at
org.netbeans.modules.bpel.properties.ImportRegistrationHelper.addImport(ImportRegistrationHelper.java:48)
	at
org.netbeans.modules.bpel.properties.editors.VariableMainPanel.applyNewValues(VariableMainPanel.java:153)
	at
org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor.processChildrenControls(AbstractCustomNodeEditor.java:433)
	at
org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor.applyNewValues(AbstractCustomNodeEditor.java:160)
	at
org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor.doValidateAndSave(AbstractCustomNodeEditor.java:178)
	at
org.netbeans.modules.bpel.properties.editors.controls.valid.NodeEditorDescriptor.processOkButtonImpl(NodeEditorDescriptor.java:81)
	at
org.netbeans.modules.bpel.properties.editors.controls.valid.NodeEditorDescriptor.access$000(NodeEditorDescriptor.java:33)
	at
org.netbeans.modules.bpel.properties.editors.controls.valid.NodeEditorDescriptor$1.call(NodeEditorDescriptor.java:52)
	at
org.netbeans.modules.bpel.model.impl.BpelModelImpl.invoke(BpelModelImpl.java:232)
	at
org.netbeans.modules.bpel.properties.editors.controls.valid.NodeEditorDescriptor.processOkButton(NodeEditorDescriptor.java:50)
	at
org.netbeans.modules.bpel.properties.editors.controls.valid.BpelDialogDescriptor$1.actionPerformed(BpelDialogDescriptor.java:70)
	at
org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1080)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5999)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)
	at java.awt.Component.processEvent(Component.java:5764)
	at java.awt.Container.processEvent(Container.java:1984)
	at java.awt.Component.dispatchEventImpl(Component.java:4407)
	at java.awt.Container.dispatchEventImpl(Container.java:2042)
	at java.awt.Component.dispatchEvent(Component.java:4237)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)
	at java.awt.Container.dispatchEventImpl(Container.java:2028)
	at java.awt.Window.dispatchEventImpl(Window.java:2405)
	at java.awt.Component.dispatchEvent(Component.java:4237)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
	at java.awt.Dialog$1.run(Dialog.java:1039)
	at java.awt.Dialog$2.run(Dialog.java:1085)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:1083)
	at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:816)
	at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:859)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:847)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1178)
	at org.openide.util.Mutex.readAccess(Mutex.java:215)
	at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:832)
	at java.awt.Component.show(Component.java:1416)
	at java.awt.Component.setVisible(Component.java:1369)
	at java.awt.Window.setVisible(Window.java:799)
	at java.awt.Dialog.setVisible(Dialog.java:979)
	at
org.netbeans.modules.bpel.nodes.actions.AddVariableAction.performAction(AddVariableAction.java:105)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:261)
	at
org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:100)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53)
	at
org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:96)
	at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:250)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1157)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1198)
	at java.awt.Component.processMouseEvent(Component.java:5999)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)
	at java.awt.Component.processEvent(Component.java:5764)
	at java.awt.Container.processEvent(Container.java:1984)
	at java.awt.Component.dispatchEventImpl(Component.java:4407)
	at java.awt.Container.dispatchEventImpl(Container.java:2042)
	at java.awt.Component.dispatchEvent(Component.java:4237)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)
	at java.awt.Container.dispatchEventImpl(Container.java:2028)
	at java.awt.Window.dispatchEventImpl(Window.java:2405)
	at java.awt.Component.dispatchEvent(Component.java:4237)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Alexey Yarmolenko 2006-09-22 14:18:19 UTC
Fixed: added check if model for imported element does not have the file object 
underneath, like in case with built-in schema elements model
Comment 2 gc140975 2006-09-25 05:31:50 UTC
Verified in the build 060923 and found that NPE no thrown