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 178631 - AssertionError while joining pl with EndpointReference at first time
Summary: AssertionError while joining pl with EndpointReference at first time
Status: CLOSED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Mapper (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: _ alexpetrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 22:03 UTC by Vitaly Bychkov
Modified: 2009-12-18 07:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (11.43 KB, application/zip)
2009-12-14 22:04 UTC, Vitaly Bychkov
Details
AssertionError Stack Trace (3.39 KB, text/plain)
2009-12-14 22:05 UTC, Vitaly Bychkov
Details
sample project (11.33 KB, application/zip)
2009-12-15 06:26 UTC, Vitaly Bychkov
Details
Project (8.49 KB, application/octet-stream)
2009-12-16 07:40 UTC, _ alexpetrov
Details
Test project (8.48 KB, application/octet-stream)
2009-12-18 05:32 UTC, _ alexpetrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Bychkov 2009-12-14 22:03:52 UTC
There are AssertionError and wrong generated copy in case joining pl with EndpointReference at first time.


Steps to reproduce:

0. create xsd variable of EndpointReference element (set name EPR)
(Add Variable... -> <ProjectName>/Bpel Global Catalog/addressing/Global Elements/EndpointReference)

1. Add new assign (Assign1)
2. double click on Assign1 to switch to the bpel Mapper
3. join (LeftTree/PartnerLinks/PartnerLink1 to RightTree/Variables/EPR)

See Assertion error appears(stackTrace is in attachment.)
Go to source, see there is wrong generated copy:
<copy>
    <from/>
</copy>


The sample project is in attachment.
In case using the sample project the step 0 can be ommited because it is already done.
Comment 1 Vitaly Bychkov 2009-12-14 22:04:53 UTC
Created attachment 92569 [details]
sample project
Comment 2 Vitaly Bychkov 2009-12-14 22:05:50 UTC
Created attachment 92570 [details]
AssertionError Stack Trace
Comment 3 Vitaly Bychkov 2009-12-15 06:26:08 UTC
Created attachment 92604 [details]
sample project
Comment 4 Vitaly Bychkov 2009-12-15 06:26:58 UTC
Please use the latest attached project to reproduce issue.
Comment 5 _ alexpetrov 2009-12-16 07:39:29 UTC
Fixed.
- gfesbv22: http://hg-soabi.stc.com/gfesbv22/rev/344ca3d64acf
- gfesbv23: http://hg-soabi.stc.com/gfesbv23/rev/361753644963

Steps for verification:
1. Unzip project "CheckWsAddrUsingProject" from the attached NewCheckWsAddrUsingProject.zip and open it.
2. Open BPEL, select Assign1 and switch to Mapper
3. Expand nodes of left and right trees, make a link from myRole (the left tree) to the variable EPR (right tree).

Result:
- Information dialog should appear
- BPEL should be updated properly
a) import should be added
<import namespace="http://docs.oasis-open.org/wsbpel/2.0/serviceref" location="http://docs.oasis-open.org/wsbpel/2.0/OS/serviceref/ws-bpel_serviceref.xsd" importType="http://www.w3.org/2001/XMLSchema"/>

b) new variable should be created
<variable name="generated_PartnerLink1_myRole" element="ns2:service-ref">
            <sxed2:editor>
                <sxed2:pseudoComp source="from" parentPath="$generated_PartnerLink1_myRole" type="ns3:EndpointReferenceType" qName="ns2:EndpointReference"/>
            </sxed2:editor>
</variable>

c) Assign1 should contain 2 <copy>
        <assign name="Assign1">
            <copy>
                <from partnerLink="PartnerLink1" endpointReference="myRole"/>
                <to variable="generated_PartnerLink1_myRole"/>
            </copy>
            <copy>
                <from>$generated_PartnerLink1_myRole/ns3:EndpointReference
                    <sxed2:editor>
                        <sxed2:pseudoComp source="from" parentPath="$generated_PartnerLink1_myRole" type="ns3:EndpointReferenceType" qName="ns1:EndpointReference"/>
                    </sxed2:editor>
                </from>
                <to variable="EPR"/>
            </copy>
        </assign>
Comment 6 _ alexpetrov 2009-12-16 07:40:40 UTC
Created attachment 92671 [details]
Project
Comment 7 Vladimir Yaroslavskiy 2009-12-17 04:11:18 UTC
Still reproducible. I've checked on GlassFish ESB ver 2.2 RC2 and the latest development build gfesbv22_671_20091216_2300.

Steps:

1. Switch on assertion: added parameter "-J-ea"  to "netbeans_default_options",
   line 6 in file <netbeans>/etc/netbeans.conf
2. Open attached project CheckWsAddrUsingProject
3. Open the BPEL document, select Assign1 and switch to BPEL Mapper
4. Link myRole (left tree) with variable EPR (right tree)

See assertion exception:

java.lang.AssertionError
at o.n.m.bpel.mapper.model.DefaultBpelModelUpdater.createVariableXPath(DefaultBpelModelUpdater.java:234)
at o.n.m.bpel.mapper.model.BpelModelUpdater.populateFrom(BpelModelUpdater.java:998)
at o.n.m.bpel.mapper.model.PartnerLinkEndpointRefHelper.handlePartnerLinkEndpointRef(PartnerLinkEndpointRefHelper.java:185)
at o.n.m.bpel.mapper.model.BpelModelUpdater.populateFrom(BpelModelUpdater.java:967)
at o.n.m.bpel.mapper.model.BpelModelUpdater.updateFrom(BpelModelUpdater.java:243)
at o.n.m.bpel.mapper.model.BpelModelUpdater.updateCopy(BpelModelUpdater.java:384)
at o.n.m.bpel.mapper.model.BpelModelUpdater.updateAssign(BpelModelUpdater.java:437)
at o.n.m.bpel.mapper.model.BpelModelUpdater.updateOnChanges(BpelModelUpdater.java:134)
at o.n.m.bpel.mapper.model.BpelChangeProcessor$1.call(BpelChangeProcessor.java:61)
at o.n.m.bpel.model.impl.BpelModelImpl.invoke(BpelModelImpl.java:237)
at o.n.m.bpel.mapper.model.BpelChangeProcessor.processChanges(BpelChangeProcessor.java:59)
at o.n.m.soa.xpath.mapper.model.XPathMapperModel.fireGraphChanged(XPathMapperModel.java:629)
at o.n.m.soa.xpath.mapper.model.XPathMapperModel.connect(XPathMapperModel.java:366)
at o.n.m.soa.mappercore.LinkTool.drop(LinkTool.java:662)
at o.n.m.soa.mappercore.AbstractMapperEventHandler.drop(AbstractMapperEventHandler.java:104)
at o.n.m.soa.mappercore.dnd.DnDSupport$DropHandler.drop(DnDSupport.java:115)
...
Comment 8 _ alexpetrov 2009-12-17 05:03:51 UTC
I'm working on this reopened issue, though it's a new AssertionError (compare stack traces)

java.lang.AssertionError at org.netbeans.modules.bpel\.model.api.support.XPathBpelVariable.<init>(XPathBpelVariable.java:45) at org.netbeans.modules.bpel.mapper.model.PartnerLinkEndpointRefHelper.handlePartnerLinkEndpointRef(PartnerLinkEndpointRefHelper.java:185)

vs.

java.lang.AssertionError at
o.n.m.bpel.mapper.model.DefaultBpelModelUpdater.createVariableXPath(DefaultBpelModelUpdater.java:234)
at
o.n.m.bpel.mapper.model.BpelModelUpdater.populateFrom(BpelModelUpdater.java:998)
at
o.n.m.bpel.mapper.model.PartnerLinkEndpointRefHelper.handlePartnerLinkEndpointRef(PartnerLinkEndpointRefHelper.java:185)
Comment 9 _ alexpetrov 2009-12-17 12:29:38 UTC
Additional fixes.
- gfesbv22: http://hg-soabi.stc.com/gfesbv22/rev/a5379b6ea2ea
- gfesbv23: http://hg-soabi.stc.com/gfesbv23/rev/0ca41aa1a175
Comment 10 senthilprabhu 2009-12-18 02:32:51 UTC
Once I copy from partnerRole to EPR variable, I get the following
1) Information dialog appears
2) Import for serviceref.xsd added, ServiceRef variable created and added 2 copies to BPEL Assign activity

This issue is verified to work correctly in GFESB build 20091217-0720. This issue can be closed.
Comment 11 _ alexpetrov 2009-12-18 05:31:00 UTC
The new correct test project "TestCheckWsAddrUsingProject.zip" is attached - use it for a bug checking.
Import of XML schema unsupported by runtime
    <import namespace="http://www.w3.org/2005/08/addressing" ... />
was changed to the correct import
    <import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" ... />.

Using of this test project will show that all namespace prefixes for generated variable will be correct in BPEL code.
Comment 12 _ alexpetrov 2009-12-18 05:32:24 UTC
Created attachment 92752 [details]
Test project
Comment 13 senthilprabhu 2009-12-18 07:31:09 UTC
I can reproduce wrong namespace generation issue with the attached project of Alex Petrov

1) Remove EPR variable.

2) Remove the following namespace prefix declarations
    xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:sxed2="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor2"

3) Rename the ns0 prefix to pme. Now the namespace prefix for Personal Mess XSD should look like this xmlns:pme="http://xml.netbeans.org/schema/personalMess" 

4) Remove the following addressing schema import
    <import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
            location="http://schemas.xmlsoap.org/ws/2004/08/addressing"
            importType="http://www.w3.org/2001/XMLSchema"/>

4) Add EPR variable and select its type as "EndpointReference" element in addressing.xsd found in BPEL Global catalog.

5) Double click the assign activity and connect myRole to EPR variable and you'll get two copies in the assign.

6) The pseudoComp element found will have wrong namespaces.

        <variable name="generated_PartnerLink1_myRole" element="ns1:service-ref">
            <sxed2:editor>
                <sxed2:pseudoComp source="from" parentPath="$generated_PartnerLink1_myRole" type="ns1:EndpointReferenceType" qName="ns2:EndpointReference"/>
            </sxed2:editor>
        </variable>

I have attached the modified project of Alex in the issue 178853
Comment 14 senthilprabhu 2009-12-18 07:38:28 UTC
As I had pointed in my earlier comment, this issue deals with the following two scenarios
- Information dialog should appear
- 2 Copies should be created in BPEL and a temporary ServiceRef variable should be created
These two scenarios work properly. 

I have filed a separate issue 178853 to track the improper namespace in pseudoComp element.

This issue is working as expected and so this issue can be closed.