Hi all,
please ignore my last mail, I was able to fix my XPath query by changing the
assign to the following code that works now as specified in the xpath doc.
Enabling the debug logging for ASSIGN helped me out, as the result of each
xpath select is printed to the log then. This is a hint to everyone who has
trouble with finding a bug in his assign statements.
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve">
<tns:result>init</tns:result>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from >
$contextQueryTargetVariable/statusMessage
</bpel:from>
<bpel:to part="payload" variable="output">
//tns:Context4BPELScenarioProcessRequest/tns:result
</bpel:to>
</bpel:copy>
</bpel:assign>
----- Original Message -----
From: "Christian Fonden" <[email protected]>
To: <[email protected]>
Sent: Sunday, May 24, 2009 8:51 PM
Subject: Exception in Assign after updating the trunk
Hi Oders,
I have updated by SVN Revision of the ODE trunk today. After Re-Deploying
a BPEL Process that worked before (in Revision 766476 ), now an Assign
fails with an ode exception listed in the ode log file.
Shall I open a JIRA Issue or am I doing something wrong that is no
recognized by the ODE after updating?
The BPEL Assign Statement and the ODE Log Entry are attached. Any help?
Greets
Chris
The Assign is as follows:
<bpel:assign validate="no" name="assign status to output">
<bpel:copy>
<bpel:from
$contextQueryTargetVariable/statusMessage
</bpel:from>
<bpel:to
$output/payload/result
</bpel:to>
</bpel:copy>
</bpel:assign>
</bpel:sequence>
This alternate Method does not work either:
<bpel:assign validate="no" name="assign status to output">
<bpel:copy>
<bpel:from variable="contextQueryTargetVariable">
<bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[c4bTypes:statusMessage]]></bpel:query>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
</bpel:sequence>
The Logfile entry that is produced looks like that:
23000 [ODEServerImpl-1] ERROR org.apache.ode.jacob.vpu.JacobVPU - Method
"run" in class "org.apache.ode.bpel.rtrep.v2.ASSIGN" threw an unexpected
exception.
java.lang.NullPointerException: elem parameter must not be null!
at org.apache.ode.utils.DOMUtils.findChildByType(DOMUtils.java:776)
at
org.apache.ode.utils.DOMUtils.getFirstChildElement(DOMUtils.java:215)
at org.apache.ode.bpel.rtrep.v2.ASSIGN.evalQuery(ASSIGN.java:295)
at org.apache.ode.bpel.rtrep.v2.ASSIGN.copy(ASSIGN.java:176)
at org.apache.ode.bpel.rtrep.v2.ASSIGN.run(ASSIGN.java:69)
at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:450)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at
org.apache.ode.bpel.rtrep.v2.RuntimeInstanceImpl.execute(RuntimeInstanceImpl.java:690)
at
org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:755)
at
org.apache.ode.bpel.engine.BpelRuntimeContextImpl.executeCreateInstance(BpelRuntimeContextImpl.java:743)
at
org.apache.ode.bpel.engine.ODEProcess.executeCreateInstance(ODEProcess.java:193)
at
org.apache.ode.bpel.engine.ODEWSProcess$1.call(ODEWSProcess.java:385)
at
org.apache.ode.bpel.engine.ODEWSProcess$1.call(ODEWSProcess.java:384)
at
org.apache.ode.bpel.engine.ODEProcess$ProcessCallable.call(ODEProcess.java:756)
at
org.apache.ode.bpel.engine.BpelInstanceWorker.doInstanceWork(BpelInstanceWorker.java:171)
at
org.apache.ode.bpel.engine.BpelInstanceWorker.execInCurrentThread(BpelInstanceWorker.java:106)
at
org.apache.ode.bpel.engine.ODEProcess.doInstanceWork(ODEProcess.java:313)
at
org.apache.ode.bpel.engine.ODEWSProcess.invokeProcess(ODEWSProcess.java:383)
at
org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.doInvoke(MyRoleMessageExchangeImpl.java:129)