Monday, September 22, 2014

XML-22036: (Error) Cannot convert result tree fragment to NodeSet - Oracle SOA Suite 11g

XML-22036: (Error) Cannot convert result tree fragment to NodeSet - Oracle SOA Suite 11g

We are getting the below exception in runtime while passing the parameter and accessing the same from XSLT in Oracle SOA Suite.




The following exception occurred while attempting to execute operation copy at line 139
-<exception class="com.collaxa.cube.xml.xpath.XPathException">
-<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
<h3>This page contains the following errors:</h3>
<div style="font-family:monospace;font-size:12px">
error on line 7 at column 1: Extra content at the end of the document
</div>
<h3>Below is a rendering of the page up to the first error.</h3>
</parsererror>
XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('xsl/DistinctPayload.xsl', $inputVariableLocal.payload, 'FlowSubscriberVar2', $FlowSubscriberVar2).
The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/PPDSOM_EventManager_rev1.0/xsl/DistinctPayload.xsl<Line 8, Column 82>: XML-22036: (Error) Cannot convert result tree fragment to NodeSet..
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
-<stack>
<f>com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate#262</f>
<f>com.collaxa.cube.engine.ext.bpel.common.BPELWMPHelper.evalFromValue#339</f>
<f>com.collaxa.cube.engine.ext.bpel.v1.wmp.BPEL1AssignWMP.__executeStatements#137</f>
<f>com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform#158</f>
<f>com.collaxa.cube.engine.CubeEngine.performActivity#2543</f>
<f>com.collaxa.cube.engine.CubeEngine._handleWorkItem#1165</f>
<f>com.collaxa.cube.engine.CubeEngine.handleWorkItem#1071</f>
<f>com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal#73</f>
<f>com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage#220</f>
<f>com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory#328</f>
<f>com.collaxa.cube.engine.CubeEngine.endRequest#4430</f>
<f>com.collaxa.cube.engine.CubeEngine.endRequest#4361</f>
<f>com.collaxa.cube.engine.CubeEngine._createAndInvoke#698</f>
<f>com.collaxa.cube.engine.CubeEngine.createAndInvoke#555</f>
<f>com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke#673</f>
<f>com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke#293</f>
<f>...</f>
</stack>
</exception>

The actual issue is, the xsl:param name in the XSLT is different from the parameter name send from BPEL.




The issue got resolved after changing the xsl:param in XSLT as same as the parameter name in Oracle BPEL.




1 comment:

  1. Nice find! Also, if the parameter that is being passed is actually a specific part of a message-type variable, such as "body", then the parameter name in the XSLT must even include that. Like xsl:param name="FlowSubscriberPart2.body" and "$FlowSubscriberPart2.body/ns1:parameters/ns1:fSubscriber" for the example above.

    ReplyDelete