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.
1. Unzip the attached project "LeadWebService". Start NB 6.1 or Sierra and open this project. 2. Open the file "leadBPEL.bpel". In the BPEL diagram right click on the activity "Invoke2" and select the popup menu item "Define Correlation..." 3. In the appeared dialog click the button "Next". 4. In the left tree expand the node "LeadCoreInfo". In the right tree expand the node "LeadDetailedInfo" and then its subnode "LeadCoreInfo". 5. Link the left tree node "LeadCoreInfo/AutoID" to the right tree node "LeadDetailedInfo/LeadCoreInfo/AutoID". Click "Finish". 6. Open the file "WizardCorrelationProperties.wsdl". Switch to its "Source", click the toolbar button "Validate XML". Result (see the attached screenshot): the following error message will appear ERROR: The first step has to be "ns0:LeadCoreInfo", if an absolute path is used for query. Expression: "/ns0:LeadCoreInfo/ns0:AutoID", though the mentioned XPath expression of the appropriate query starts with "ns0:LeadCoreInfo" exactly. This bug is reproduced on NB 6.1 and Sierra (soa-dev), but it's not reproduced on NB 6.5 trunk. The reason is: The module "WSDL Model Extensions" (xml.wsdl.extensions) contains the class "PathValidatorVisitor" and this class contains the method "checkFirstStepType", which is used for validation and produces an error message (NB 6.1 and Sierra only). This method contains the folowing java code (important lines are marked by "==>"): Set<SchemaCompPair> scPairSet = null; LocationStep[] stepArr = locationPath.getSteps(); if (stepArr != null && stepArr.length != 0) { LocationStep firstStep = stepArr[0]; if (firstStep != null) { ==> XPathSchemaContext sContext = firstStep.getSchemaContext(); if (sContext != null) { scPairSet = sContext.getSchemaCompPairs(); } } } ............................................................ ==> if (scPairSet.size() == 1) { ............................. } Classes "LocationStep", "SchemaCompPair", "XPathSchemaContext", "MultiCompSchemaContext", "SimpleSchemaContext" are contained in the module "Enterprise XPath" (xml.xpath.ext). FOR NB 6.1 and SIERRA: ---------------------- "XPathSchemaContext sContext = firstStep.getSchemaContext();" returns an instance of the class "MultiCompSchemaContext" for the LEFT XPath expression "/ns0:LeadCoreInfo/ns0:AutoID". Then "scPairSet = sContext.getSchemaCompPairs();" and "scPairSet.size()" returns a value 2, which causes an error message. For the RIGHT XPath expression "/ns0:LeadDetailedInfo/ns0:LeadCoreInfo/ns0:AutoID" a statement "XPathSchemaContext sContext = firstStep.getSchemaContext();" gives an instance of the class "SimpleSchemaContext". "scPairSet.size()" returns a value 1 and no new error message is produced. FOR NB 6.5: ----------- A statement "XPathSchemaContext sContext = firstStep.getSchemaContext();" gives an instance of the class "SimpleSchemaContext" in both cases: for the LEFT XPath expression "/ns0:LeadCoreInfo/ns0:AutoID" and for the RIGHT XPath expression "/ns0:LeadDetailedInfo/ns0:LeadCoreInfo/ns0:AutoID". "scPairSet.size()" returns a value 1 in both cases and error messages don't appear at all.
Created attachment 70619 [details] Project
Created attachment 70620 [details] screenshot
The problem is that module xml.wsdl.extensions (which comes from NetBeans 6.1 patch 3 binary) has dependency to xml.xpath.ext module and uses it. The real cause of problem is xml.xpath.ext (it is old version from NetBeans 6.1), the issue was fixed in new version of the module xml.xpath.ext01. So, there are one of the two ways: 1. to clone xml.xml.wsdl.extensions from release61_fixes to soa-dev and change dependency to xml.xpath.ext01 2. apply fix in xml.xpath.ext in release61_fixes and wait NetBeans 6.1 patch 4
Fixed in NB 6.5.
Since the issue has been resolved in the trunk as a part of large code refactoring, the regression doesn't impend and so the issue could be fixed in the release61_fixes branch as part of 61patch4. Could you please provide a diff of proposed changes in the attachment? Also QE's explanation "how safe the change is" should be filled in the description.
Created attachment 71064 [details] This diff shold to be applied to release61_fixes
Created attachment 71065 [details] The same as diff but in the hg export patch form
The issue is quite serious and would better be fixed in Patch 4. I can't say how safe the fix is and suggest to rely on developer's opinion on that.
The issue has been fixed in the release61_fixes branch: http://hg.netbeans.org/release61_fixes/rev/329ed29f51e6
tested and verified using NetBeans IDE 6.1 Full distribution and http://bits.netbeans.org/netbeans/6.1/fixes/2008-10-03_19-45-23/uc/catalog.xml.gz and followed the steps below and was able to create correlation from "LeadCoreInfo/AutoID" to the right tree node "LeadDetailedInfo/LeadCoreInfo/AutoID". and did not see any errors during BPEL validate and "WizardCorrelationProperties.wsdl" validate.
Marked as VERIFIED based on the comment above.