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.
Encountered few issue while testing XSD inheritance support. Issues are enumerated below and Project is attached. Description of project. It is simple synchronous business process which receives a message with one part (Person element) and replies with another message with one part (Person element). In Assign1 I have type casted A - "person" element ("PersonType") to "EmployeeType", it is extension of "PersonType" B - "address" element ("AddressType") to "USAddressType", it is extension of "AddressType" Issue - 1 It generates wrong xpath expression in Assign1 to set xsi:type, please refer to xpath expression below <copy> <from> <literal>ns2:USAddressType</literal> </from> <to>$BPTypeHierarchyOperationOut/ns1:person/ns1:address/@xsi:type</to> </copy> Following "Assign1" I have added "if" and "Assign2" activities If - verifies the value set on "empId", Assign2 sets value on "note" element. Issue -2 It generates redundant copy statements in Assign2, please note "$BPTypeHierarchyOperationOut/ns1:person/ns1:address/@xsi:type" is invalid. <copy> <from> <literal>ns2:USAddressType</literal> </from> <to>$BPTypeHierarchyOperationOut/ns1:person/ns1:address/@xsi:type</to> </copy> <copy> <from> <literal>ns0:EmployeeType</literal> </from> <to>$BPTypeHierarchyOperationOut.part1/@xsi:type</to> </copy> Issue - 3 Mapper fails to render "Assign1" & "Assign2", but it is fine with "if". Issue - 4 It reprots 5 errors and 2 warnings. It should be 0 errors and 0 warnings. XML validation started. C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:132,16 WARNING: Currently the Sun BPEL SE does not support types for XML attributes. C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:138,16 WARNING: Currently the Sun BPEL SE does not support types for XML attributes. C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:147,12 ERROR: BooleanExpr: Can not find the element "ns0:empId" at the namespace "http://xml.netbeans.org/examples/EmployeeNS". Expression: "$BPTypeHierarchyOperationOut.part1/ns0:empId = '100'" C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:84,16 ERROR: To: Can not find the element "ns2:city" at the namespace "http://xml.netbeans.org/examples/AddressNS". Expression: "$BPTypeHierarchyOperationOut.part1/ns1:address/ns2:city" C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:108,16 ERROR: To: Can not find the element "ns2:zip" at the namespace "http://xml.netbeans.org/examples/AddressNS". Expression: "$BPTypeHierarchyOperationOut.part1/ns1:address/ns2:zip" C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:96,16 ERROR: To: Can not find the element "ns2:state" at the namespace "http://xml.netbeans.org/examples/AddressNS". Expression: "$BPTypeHierarchyOperationOut.part1/ns1:address/ns2:state" C:/OpenESB/head/open-jbi-components/driver-tests/bpelse/assign/TypeHierarchy/src/BPTypeHierarchy.bpel:159,20 ERROR: To: Can not find the element "ns2:note" at the namespace "http://xml.netbeans.org/examples/AddressNS". Expression: "$BPTypeHierarchyOperationOut.part1/ns1:address/ns2:note"
Created attachment 73807 [details] Project to reproduce issue
Raising priority since this is a regression from earlier builds.
I'm not sure I understood "Issue -2 It generates redundant copy statements in Assign2" Where is the redundancy?
Here is a result of investigation: This issue is a combination of 3 different problems: 1. The BPEL XPath validation uses the TypeCast and PseudoComp extensions only in case of Assign-->Copy Small amount of work (<1day) required to fix it. It appears only in validation. See "Can not find the element "ns0:empId" in the ..." in the validation results above. 2. There is a small bug with generating XPath: $BPTypeHierarchyOperationOut/ns1:person/ns1:address/ shoudl be $BPTypeHierarchyOperationOut.part1/ns1:address/ It's very simple and I already fixed it locally. 3. Problem with nested TypeCast declarations. It is most difficult and massive. It is necessary to rewrite big amount of classes. Fortunately the job already has been started. But it was suspended some time. It was considered as a feature. See issue #149532
It's not a regression and not even the bug. It's feature. "TypeCast" feature has a lot of particular cases. This one wasn't implemented. I'll keep it as DEFECT just to keep it visible.
I pushed a fix for generating a correct XPath to soa-dev http://hg.netbeans.org/soa-dev/rev/fd3505c33884
Partly fixed the problem #3 - with nested type casts. http://hg.netbeans.org/soa-dev/rev/80ecc126d698 -- it was affected about 100 files http://hg.netbeans.org/soa-dev/rev/6f5555fb9bb8 The SropResolvingException can appear sometime. It should be hidden later. I use it in debugging purposes.
One more changes at soa-dev http://hg.netbeans.org/soa-dev/rev/63812abca0a7
One more changes to soa-dev http://hg.netbeans.org/soa-dev/rev/605bfad9d371
One more changes to soa-dev: http://hg.netbeans.org/soa-dev/rev/2168629e455d
New changesets: http://hg.netbeans.org/soa-dev/rev/3e5e9bd3ee2b http://hg.netbeans.org/soa-dev/rev/5104f2750ffa
Predicates' editing should work now. Changeset: http://hg.netbeans.org/soa-dev/rev/d9ed985701cc
Prevents typecast of attribute to complex type http://hg.netbeans.org/soa-dev/rev/ec1546125a2d
Fix bpel model sync issue while editing editor extension element from source. http://hg.netbeans.org/soa-dev/rev/09e9acc51a79
Prevent validation errors http://hg.netbeans.org/soa-dev/rev/7dcdbc637258
Corrected Predicate Editor http://hg.netbeans.org/soa-dev/rev/1305e1332ecb
all known problem are fixed
I am using sierra_1961_20081213_0541.zip, there is still issue with generation of xsi:type attribute. I have created project from scratch using the person, address and employee schema documents. Project is attached.
Created attachment 74919 [details] new project to demonstrate the issue
It should generate two copy statements with @xsi:type as there are two type casts. <copy> <from> <literal>ns2:USAddressType</literal> </from> <to>$BPTypeHierarchyOperationOut.part1/ns1:address/@xsi:type</to> </copy> <copy> <from> <literal>ns0:EmployeeType</literal> </from> <to>$BPTypeHierarchyOperationOut.part1/@xsi:type</to> </copy>
Validation reports C:/temp/NZTelecom/TypeHierarchy/src/TypeHierarchy.bpel:110,9 WARNING: The types of "From" and "To" activities are different: "string" and "token". At line 110 there is nothing else other than <copy> So warning is not right.
Small changes with toString() method http://hg.netbeans.org/soa-dev/rev/7538b9353b22
It is my changesets for this Issue: http://hg.netbeans.org/soa-dev/rev/338775db34d4 http://hg.netbeans.org/soa-dev/rev/a2102dac0c07 http://hg.netbeans.org/soa-dev/rev/fb45d179d75f http://hg.netbeans.org/soa-dev/rev/bd89cb4ec9ea http://hg.netbeans.org/soa-dev/rev/cd19da71ccd5
Created attachment 74980 [details] Corrected initial project
Created attachment 74981 [details] Another one corrected project.
New changesets: http://hg.netbeans.org/soa-dev/rev/287f00d95359 http://hg.netbeans.org/soa-dev/rev/311d7e9f69be Don't you think it well enough to consider it fixed and consider another errors as separate issues?
New changesets: to add right prefix http://hg.netbeans.org/soa-dev/rev/12f62d62e6f3
The issue #155941 describes a side effect caused by the fix of this issue. It probably should be taken into account in case of migrating this issue to another branch.
Few more issues. 1. When a node is "cast to", name space definitions are added to account for the "Process" element, but corresponding <import>s are not added. This makes run time fail with. Project is attached, to reproduce the issue. un-comment imports it would work. [#|2008-12-23T16:09:27.644-0800|WARNING|sun-appserver9.1|com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl|_ThreadID=45;_ThreadName=BPELSEInOutThread6;_RequestID=e3428a67-276e-48df-9791-84ee98fdcb24;|BPCOR-6151:The process instance has been terminated because a fault was not handled; Fault Name is {http://docs.oasis-open.org/wsbpel/2.0/process/executable}invalidVariables; Fault Data is null com.sun.jbi.engine.bpel.core.bpel.exception.StandardException: BPCOR-6175:Invalid document <?xml version="1.0" encoding="UTF-8" standalone="no"?><jbi:message xmlns:msgns="http://j2ee.netbeans.org/wsdl/TypeHierarchy/TypeHierarchy" type="msgns:TypeHierarchyOperationResponse" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><ns1:person xmlns:ns0="http://xml.netbeans.org/examples/EmployeeNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns0:EmployeeType" xmlns:ns1="http://localhost/person"><ns1:firstName>John</ns1:firstName><ns1:lastName>Doe</ns1:lastName><ns1:address xmlns:ns2="http://xml.netbeans.org/examples/AddressNS" xsi:type="ns2:USAddressType"><ns2:name>John Doe</ns2:name><ns2:street>800 Royal Oaks</ns2:street><ns2:city>Monrovia</ns2:city><ns2:state>CA</ns2:state><ns2:zip>91016</ns2:zip></ns1:address><ns0:department>CS</ns0:department><ns0:empId>100</ns0:empId></ns1:person></jbi:part></jbi:message> is assigned to TypeHierarchyOperationOut in BP instance (10.0.237.249:3f2e28db:11e6620b6fd:-7f44) at line 28 BP {http://enterprise.netbeans.org/bpel/TypeHierarchy/TypeHierarchy}TypeHierarchy BPCOR-6129:Line Number is 28 BPCOR-6130:Activity Name is Assign1 at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.createVirtualFaultUnit(BPELInterpreter.java:234) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:202) at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1046) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:278) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1293) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processRequest(BPELSEInOutThread.java:451) at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:262) at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:193) Caused by: com.sun.xml.transform.sware.MissingSchemaInfoException: Cannot find the XML type definition in the schema type system: {http://xml.netbeans.org/examples/EmployeeNS}EmployeeType at com.sun.xml.transform.sware.impl.ReorderTransformerImpl.transform(ReorderTransformerImpl.java:154) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.transformDocument(AssignUnitImpl.java:471) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.validateOrAndTransformVariable(AssignUnitImpl.java:402) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.doAction(AssignUnitImpl.java:334) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doAction(StructuredActivityUnitImpl.java:93) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SequenceUnitImpl.doAction(SequenceUnitImpl.java:95) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193) at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doAction(BPELProcessInstanceImpl.java:650) at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:147) ... 7 more |#] 2. I could access nodes in the derived type EmployeeType & USAddressType on TypeHierarchyOperationOut variable in Assign2 with no explicit cast operation. It looks like retains the type cast from Assign1, but it is not the case for IF condition. 3. Assign2, it generates redundant <copy> statements for @xsi:type.
Created attachment 75288 [details] Project attached on Dec 23 demonstrate new issues
The assignment of the attribute of derived type is not working. 1. In the project testProject-bp.zip select CreateService operation of external WSDL. 2. Do 'cast' to the request->service->subscriber->attributes->ct_attribute. Select singlevalue or multivalue. 3. You'll see now that the 'derived type' has additional attributes and element. 4. Map the attributes 5. Switch to designer view, there are errors on Assign3 components 6. Switch back to the mapper, the assignments done before are removed 7. However the problematic code is not removed from source code OpenESB Nightly build 08.01.2009
I fixed the problem described by Lucia to soa-dev. Here is the changeset: http://hg.netbeans.org/soa-dev/rev/63d5c4f020e0
Created attachment 76166 [details] The mentioned project testProject-bp. It is a bit corrected here.
It turned out the same problem like has been found by Lucia with TypeCast exists for another Location Step Modifiers (LSM) - Predicates and Pseudo Components. Here is a small fix: http://hg.netbeans.org/soa-dev/rev/8379b867b083
The issue #157553 has important fixes related to the functionality covered by this issue. It should be taken into account while partial migration to another branch!
Close it because all issues it depends on are fixed.
QA: This ticket documents many issues which have been opened, fixed, opened, and fixed. The current build appears to be stable and consistent with the desired state. Therefore, this ticket is varified with the NetBeans IDE 6.5.1 (Build 200904151427). Further issues will be documented with new tickets.