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 81865 - Getting NullPointerException when creating the Partner Link
Summary: Getting NullPointerException when creating the Partner Link
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Nikita Krjukov
URL:
Keywords: REGRESSION
: 82657 82670 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-03 22:18 UTC by jchieu
Modified: 2006-09-19 02:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample Wsdl file (1.14 KB, application/octet-stream)
2006-08-03 22:19 UTC, jchieu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jchieu 2006-08-03 22:18:07 UTC
Either use your wsdl or the simple wsdl attached to this ticket.
Create a new BPEL Process in the BPEL Model.
In the Navigator panel, click on the Imports.
Right Mouse button to Add Import.
Browse to your wsdl.
Click on the Ok button.
Click on the Variables in the Navigator panel.
Right Mouse button to Add Variable.
Expand the wsdl to the message and click ok.
From the top select the Window tab to enable the Properties tab to show.
From the Palette panel, drag and drop the Partner Link into the main diagram.
When the PartnerLink1 window appears, Drop down the Partner Link Type with a 
valid entry.
In the My Role: drop down to a valid entry and select ok.
The following NullPointerException will appear in a window.
If you don't add the Variable first the NullPointer Exception will no appear.
java.lang.NullPointerException
	at org.netbeans.modules.bpel.nodes.VariableNode.updateComplexProperties
(VariableNode.java:435)
	at 
org.netbeans.modules.bpel.nodes.BpelNode$Synchronizer.notifyPropertyUpdated
(BpelNode.java:761)
	at 
org.netbeans.modules.bpel.model.api.events.ChangeEventSupport.notifyChangeEvent
(ChangeEventSupport.java:176)
[catch] at 
org.netbeans.modules.bpel.model.api.events.ChangeEventSupport.fireChangeEvent
(ChangeEventSupport.java:152)
	at 
org.netbeans.modules.bpel.model.impl.BpelModelImpl$Transaction.commitEvents
(BpelModelImpl.java:875)
	at org.netbeans.modules.bpel.model.impl.BpelModelImpl$Transaction.end
(BpelModelImpl.java:783)
	at org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeUnlock
(BpelModelImpl.java:614)
	at org.netbeans.modules.bpel.model.impl.BpelModelImpl.writeUnlock
(BpelModelImpl.java:499)
	at org.netbeans.modules.bpel.model.impl.BpelModelImpl.invoke
(BpelModelImpl.java:266)
	at org.netbeans.modules.bpel.design.DnDHandler.drop(DnDHandler.java:264)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage
(SunDropTargetContextPeer.java:500)
	at sun.awt.dnd.SunDropTargetContextPeer.access$800
(SunDropTargetContextPeer.java:53)
	at 
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent
(SunDropTargetContextPeer.java:812)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent
(SunDropTargetContextPeer.java:736)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
	at java.awt.Component.dispatchEventImpl(Component.java:3826)
	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.processDropTargetEvent
(Container.java:3963)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3817)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1766)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	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 jchieu 2006-08-03 22:19:14 UTC
Created attachment 32513 [details]
Sample Wsdl file
Comment 2 Michael Frisino 2006-08-04 08:04:56 UTC
is this a regression? Maybe related to Nikita work from last weekend. Once we
understand cause, we may need to make sure the regression is not more widespread.
Comment 3 Nikita Krjukov 2006-08-10 13:43:13 UTC
The reason is the same like in the issue #81711
It is fixed in the release55 branch
Comment 4 Michael Frisino 2006-08-14 15:31:36 UTC

Reopening because this is not fixed in beta branch, only fixed in trunk.

Adding ENTPACK_BETA_STOPPER status so that Bug council knows about this. It may
not be showstopper because the NPE appears to be harmless - the PartnerLink is
added successfully to the diagram despite the NPE. 

However, user might be confused and uncertain if the Add Partner Link was success. 

Anyway, the fix for this was made only in the trunk, not in the beta branch. If
we are to do another build, this would be a good fix to add to branch. If we are
not doing another build, we would have to decide if this bug alone is
showstopper or not.
Comment 5 Michael Frisino 2006-08-14 15:32:58 UTC
The fix is very low risk - it is only addition of if(!null)
Comment 6 pcmreddy 2006-08-14 15:57:03 UTC
To make sure it appeared on dashboard.
Comment 7 Todd Fast 2006-08-14 22:44:28 UTC
Because of the need to add a variable before the partner link, this doesn't seem
to be a primary use case; without further input from Mike, I am OK to waive this
bug for beta.

However, it seems that this workflow is overly complex. Why is it necessary to
add a variable, import, and add partner link as separate actions? Is there a use
case for adding a variable using an imported WSDL without the WSDL automatically
being a partner link?
Comment 8 Mikhail Kondratyev 2006-08-15 07:12:52 UTC
*** Issue 82657 has been marked as a duplicate of this issue. ***
Comment 9 Michael Frisino 2006-08-15 09:44:00 UTC
I'm not sure which workflow you are referring to as overly complex. You can
either add fine grained units - import, variable, partner link 

or you can do all in one action - 
NnD WSDL from project explorer into Diagram - 
add partner link dialog shows up.
Complete partner link dialog - taking choice to "Auto create variable".
Done - one action 

Result is that import statement is generated, variable declaration is generated,
and partner link is generated. 

-------------

If you are only concerend about Adding a variable. 
You can choose the Add Variable Action on Process or Scope element.
In the Add Variable editor uncheck the "Show only imported files".
This will expand the list of WSDL and Schema files to include those which have
not yet been "imported".
Define a variable based on type from WSDL or Schema.
Done

This will generate the necessary import statement for the WSDL or XSD and
genearte the new variable. No partner link definition is involved.
I think this satisfies your question. No?
Comment 10 Michael Frisino 2006-08-15 09:47:43 UTC
BTW - the NPE in this bug has nothing to do with the workflow as far as I know.
The NPE is just an unfortunate regression. The "variable" mentioned in this bug
scenario need not have any relationship to the Partner Link that is later added. 
Comment 11 Michael Frisino 2006-08-15 11:49:19 UTC
Again to Todd's question about workflow. There are many scenarios that need to
be tested which do  not represent the most efficient workflow. However, they do
represent possible workflow. Since the BPEL designer supports fine grained
process authoring, there are a multitude of workflow permutations that authors
may undertake. Some permutations are more concise and efficient than others. The
scenario listed here is less efficient than the alternatives that i listed in
response to your question. However, it is a valid scenario, as are many others
that would  appear to be "cumbersome". Its like any other programming model,
where developers can acheive the same authoring result through a variety of
differnt incremental steps.
Comment 12 Mikhail Kondratyev 2006-08-15 12:26:17 UTC
Just 5 cents from QE:
The real scenario to reproduce the bug is quite simple:
 - create BPEL process
 - create any variable 
 - create partnerLink
Exception will be thrown

This workflow is very easy to reproduce. Especially when you have more than one
partner link in the process
Comment 13 Nikita Krjukov 2006-08-17 16:45:15 UTC
*** Issue 82670 has been marked as a duplicate of this issue. ***
Comment 14 Nikita Krjukov 2006-08-21 18:58:18 UTC
No other build is planned.
Comment 15 lchang 2006-09-19 02:38:18 UTC
Verified in the latest 0914 build, and this problem does not happen anymore