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 81507 - NPE while opening broken bpel file
Summary: NPE while opening broken bpel file
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Alexey Yarmolenko
URL:
Keywords: REGRESSION, RELNOTE
Depends on: 81381
Blocks:
  Show dependency tree
 
Reported: 2006-07-31 16:28 UTC by Alexander Pepin
Modified: 2006-10-24 19:38 UTC (History)
5 users (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 Alexander Pepin 2006-07-31 16:28:22 UTC
Steps to reproduce:
- create Synchronous sample project
- open SynchronousSample.bpel in the editor outside IDE and remove closing
process tag (</process>)
- switch to IDE and double-click on this file in projects tree 
Result: NPE occurs
java.lang.NullPointerException
	at
org.netbeans.modules.bpel.core.validation.BPELValidationController.<init>(BPELValidationController.java:62)
	at org.netbeans.modules.bpel.core.BPELDataObject.getLookup(BPELDataObject.java:172)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.getLookup(BpelNavigatorPanel.java:120)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.getBpelModel(BpelNavigatorPanel.java:113)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.panelActivated(BpelNavigatorPanel.java:92)
	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)



If user trys to switch to design view one more NPE occurs:
java.lang.NullPointerException
	at
org.netbeans.modules.bpel.core.BPELDataEditorSupport.syncModel(BPELDataEditorSupport.java:189)
	at
org.netbeans.modules.bpel.core.multiview.BPELSourceMultiViewElement.componentHidden(BPELSourceMultiViewElement.java:192)
	at org.netbeans.core.multiview.MultiViewPeer.hideElement(MultiViewPeer.java:229)
	at
org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged(MultiViewPeer.java:621)
	at
org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged(MultiViewModel.java:230)
	at
org.netbeans.core.multiview.MultiViewModel.setActiveDescription(MultiViewModel.java:99)
	at
org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:280)
	at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:215)
	at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:139)
	at
org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:276)
	at
org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed(TabsComponent.java:420)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
	at java.awt.Component.processMouseEvent(Component.java:5485)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	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:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	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 Alexander Pepin 2006-07-31 17:07:26 UTC
Scenario 2:
- create Synchronous sample project
- open SynchronousSample.bpel in the editor and remove closing
process tag (</process>)
- save changes and close editor
- once again open SynchronousSample.bpel in the editor
Result: IllegalStateException occurs:
java.lang.IllegalStateException: Xml file is broken. One cannot mutate model in
broken state.
	at
org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeLock(BpelModelImpl.java:593)
	at
org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeLock(BpelModelImpl.java:495)
	at
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.writeLock(BpelEntityImpl.java:537)
	at
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.setCookie(BpelEntityImpl.java:269)
	at
org.netbeans.modules.bpel.design.model.DiagramModel.createPattern(DiagramModel.java:206)
	at org.netbeans.modules.bpel.design.DesignView.reloadModel(DesignView.java:213)
	at org.netbeans.modules.bpel.design.DesignView.<init>(DesignView.java:205)
	at
org.netbeans.modules.bpel.editors.multiview.DesignerMultiViewElement.createDesignView(DesignerMultiViewElement.java:371)
	at
org.netbeans.modules.bpel.editors.multiview.DesignerMultiViewElement.initializeUI(DesignerMultiViewElement.java:379)
	at
org.netbeans.modules.bpel.editors.multiview.DesignerMultiViewElement.<init>(DesignerMultiViewElement.java:163)
	at
org.netbeans.modules.bpel.editors.multiview.DesignerMultiViewElementDesc.createElement(DesignerMultiViewElementDesc.java:56)
	at
org.netbeans.core.multiview.MultiViewModel.getElementForDescription(MultiViewModel.java:191)
	at
org.netbeans.core.multiview.MultiViewModel.getActiveElement(MultiViewModel.java:111)
	at
org.netbeans.core.multiview.MultiViewModel.getActiveElement(MultiViewModel.java:107)
	at
org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:243)
	at
org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:235)
	at
org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged(MultiViewPeer.java:622)
	at
org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged(MultiViewModel.java:230)
	at
org.netbeans.core.multiview.MultiViewModel.setActiveDescription(MultiViewModel.java:99)
	at
org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:280)
	at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:215)
	at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:139)
	at
org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:276)
	at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:215)
	at javax.swing.AbstractButton.setSelected(AbstractButton.java:274)
	at
org.netbeans.core.multiview.TabsComponent.changeActiveManually(TabsComponent.java:153)
	at
org.netbeans.core.multiview.MultiViewPeer$MVTCHandler.requestActive(MultiViewPeer.java:648)
	at
org.netbeans.core.api.multiview.MultiViewHandler.requestActive(MultiViewHandler.java:73)
	at
org.netbeans.modules.bpel.core.multiview.BpelMultiViewSupport.requestViewOpen(BpelMultiViewSupport.java:114)
	at
org.netbeans.modules.bpel.core.BPELDataObject$BPELNode$1.actionPerformed(BPELDataObject.java:341)
	at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1364)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211)
	at java.awt.Component.processMouseEvent(Component.java:5491)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	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:3901)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	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)

After reopening IDE user gets NPE described in scenario1

Comment 2 Alexey Yarmolenko 2006-07-31 17:29:21 UTC
Fixed on DesignView side for scenario #2, but NPE in Validator still exists
Comment 3 Praveen Savur 2006-07-31 20:02:36 UTC
fixed scenario #1 for now.

  I think the case of bpelModel being null if the file is not well formed needs
review. bpelModel should not be null in that case but should indicate a state of
NOT_Well_Formed.


Now I see another scenario:

Scenario #3:
java.lang.NullPointerException
	at
org.openide.util.lookup.InstanceContent$SimpleItem.<init>(InstanceContent.java:150)
	at org.openide.util.lookup.SimpleLookup.<init>(SimpleLookup.java:47)
	at org.openide.util.lookup.Lookups.fixed(Lookups.java:75)
	at org.netbeans.modules.bpel.core.BPELDataObject.getLookup(BPELDataObject.java:172)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.getLookup(BpelNavigatorPanel.java:120)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.getBpelModel(BpelNavigatorPanel.java:113)
	at
org.netbeans.modules.bpel.navigator.BpelNavigatorPanel.panelActivated(BpelNavigatorPanel.java:92)
	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 4 Alexey Yarmolenko 2006-08-01 07:55:46 UTC
Vitaly, please have a look on exception on navigator side.
Comment 5 Vitaly Bychkov 2006-08-01 13:35:10 UTC
Fixed scenario #3 for now.

It had been observed that number of modules 
used approach that bpelModel couldn't be null.

So it requires number too riscue changes/redesigns on the our side for now.
Comment 6 Michael Frisino 2006-08-01 13:48:07 UTC
Guys, when we address this we should also consider 
Comment 7 Michael Frisino 2006-08-01 13:53:08 UTC
Guys, when we address this we should consider the following.
If source is malformed and OM cannot be created based on the source, do we have
a "new" gap in validation work flow? In prior TPR versions, the XML source
editor validation would invoke the off the shelf xml validation utility which
would operate on the source file. That would report the malformed errors and
help user identify the location of the malformed source.

In newer validation system, it is my understanding we no longer invoke the XML
validation to act on bpel source. As I understand it we invoke the XML valdiatio
and pass it stream from our OM. But in this use case, even in solution proposed
here, will not be representative of the source and therefore the validation will
not have anything to report? Am I wrong?
Comment 8 Michael Frisino 2006-08-03 21:57:23 UTC
Alexy Y has fix for this. I thought he was going to check it in. Maybe he forgot
to update bug status.
Comment 9 Praveen Savur 2006-08-03 23:04:01 UTC
 Checked in fix sent by Alexey. 

 This fix will only be in cokebeta branch, as in release55 this will be handled
at the xam level.
Comment 10 _ hong_lin 2006-08-04 07:29:43 UTC
ok to waive it for beta release. Removed the STOPPER keyword.
Comment 11 Praveen Savur 2006-08-05 01:12:49 UTC
Adding link to issue 81381 for tracking purpose.
Comment 12 Alexander Pepin 2006-08-08 14:31:27 UTC
verified in build 060806_1
Comment 13 Mikhail Kondratyev 2006-08-28 09:42:19 UTC
I can reproduce the scenario2 (remove closing process tag, close and reopen
project) but the exception is a bit different:
java.lang.IllegalStateException: Xml file is broken. One cannot mutate model in
broken state.
	at
org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeLock(BpelModelImpl.java:571)
	at
org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeLock(BpelModelImpl.java:473)
	at
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.writeLock(BpelEntityImpl.java:505)
	at
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.setCookie(BpelEntityImpl.java:237)
	at
org.netbeans.modules.bpel.design.decoration.DecorationManager.updateResult(DecorationManager.java:171)
	at
org.netbeans.modules.bpel.design.decoration.DecorationManager.updateResultRecursive(DecorationManager.java:263)
	at
org.netbeans.modules.bpel.design.decoration.DecorationManager.decorationChanged(DecorationManager.java:115)
	at
org.netbeans.modules.bpel.design.decoration.DecorationProvider.fireDecorationChanged(DecorationProvider.java:48)
	at
org.netbeans.modules.bpel.design.decoration.providers.DebuggerDecorationProvider.access$000(DebuggerDecorationProvider.java:43)
[catch] at
org.netbeans.modules.bpel.design.decoration.providers.DebuggerDecorationProvider$1.run(DebuggerDecorationProvider.java:94)
	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 14 Alexey Yarmolenko 2006-09-13 10:46:20 UTC
check for model state was added to DecorationManager about 10 days ago. 
DecorationManager does not respond to evens from decoration provoder when 
model is not in valid state, thus avoiding attempts to modify BpelEntity 
cookies in this state.

Comment 15 Alexander Pepin 2006-09-18 16:28:56 UTC
verified in build 060915