[ 
https://issues.apache.org/jira/browse/ODE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karthick Sankarachary closed ODE-508.
-------------------------------------


> Handle Multiple Variable References In XPath
> --------------------------------------------
>
>                 Key: ODE-508
>                 URL: https://issues.apache.org/jira/browse/ODE-508
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.1
>         Environment: Ode trunk somewhat prior to revision 741158 deployed in 
> tomcat 6.0.14 as a web app.
>            Reporter: Douglas Scott Jackson
>            Assignee: Karthick Sankarachary
>            Priority: Critical
>             Fix For: 1.3.1
>
>         Attachments: test.zip
>
>
> In an if condition the access of a variable throws a null pointer exception 
> as follows:
>     <variable name="i-unsuccessful" type="xsd:boolean" />
>     <variable name="m-unsuccessful" type="xsd:boolean" />
> ...
>         <if name="If__m_and_i_successful">
>           <condition>($m-unsuccessful or $i-unsuccessful) = false</condition>
> LineNo = 2530
>       Class = class org.apache.ode.bpel.evt.ActivityEnabledEvent
> DEBUG - GeronimoLog.debug(66) | 
> ActivityExecStartEvent:
>       Type = activityLifecycle
>       ActivityId = 197
>       ActivityName = If__m_and_i_successful
>       ActivityType = OSwitch
>       ActivityDeclarationId = 1771
>       ScopeId = 28269
>       ScopeDeclarationId = 3
>       ScopeName = __PROCESS_SCOPE:dtran
>       ParentScopesNames = [__PROCESS_SCOPE:dtran]
>       ProcessInstanceId = 28202
>       ProcessId = {http://xxx/yyy}dtran-64
>       ProcessName = {http://xxx/yyy}dtran
>       Timestamp = Thu Feb 05 13:21:49 CST 2009
>       
> LineNo = 2530
>       Class = class org.apache.ode.bpel.evt.ActivityExecStartEvent
> DEBUG - GeronimoLog.debug(66) | Resolving variable m-unsuccessful
> DEBUG - GeronimoLog.debug(66) | 
> VariableReadEvent:
>       Type = dataHandling
>       VarName = m-unsuccessful
>       ScopeId = 28269
>       ScopeDeclarationId = 3
>       ScopeName = __PROCESS_SCOPE:dtran
>       ParentScopesNames = [__PROCESS_SCOPE:dtran]
>       ProcessInstanceId = 28202
>       ProcessId = {http://xxx/yyy}dtran-64
>       ProcessName = {http://xxx/yyy}dtran
>       Timestamp = Thu Feb 05 13:21:49 CST 2009
>       LineNo = 30
>       Class = class org.apache.ode.bpel.evt.VariableReadEvent
> DEBUG - GeronimoLog.debug(66) | Resolving variable i-unsuccessful
> DEBUG - GeronimoLog.debug(70) | Could not evaluate expression because of 
> java.lang.NullPointerException
>       at 
> org.apache.ode.bpel.rtrep.v2.ExprEvaluationContextImpl.readVariable(ExprEvaluationContextImpl.java:74)
>       at 
> org.apache.ode.bpel.rtrep.v2.xpath20.JaxpVariableResolver.resolveVariable(JaxpVariableResolver.java:97)
>       at 
> net.sf.saxon.xpath.JAXPVariable.evaluateVariable(JAXPVariable.java:110)
>       at 
> net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:480)
>       at 
> net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:433)
>       at 
> net.sf.saxon.expr.Expression.effectiveBooleanValue(Expression.java:421)
>       at 
> net.sf.saxon.expr.BooleanExpression.effectiveBooleanValue(BooleanExpression.java:185)
>       at 
> net.sf.saxon.expr.BooleanExpression.evaluateItem(BooleanExpression.java:172)
>       at net.sf.saxon.expr.Expression.iterate(Expression.java:370)
>       at 
> net.sf.saxon.expr.GeneralComparison.effectiveBooleanValue(GeneralComparison.java:511)
>       at 
> net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:310)
>       at 
> org.apache.ode.bpel.rtrep.v2.xpath20.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:236)
>       at 
> org.apache.ode.bpel.rtrep.v2.xpath20.XPath20ExpressionRuntime.evaluateAsBoolean(XPath20ExpressionRuntime.java:87)
>       at 
> org.apache.ode.bpel.rtrep.v2.ExpressionLanguageRuntimeRegistry.evaluateAsBoolean(ExpressionLanguageRuntimeRegistry.java:71)
>       at org.apache.ode.bpel.rtrep.v2.SWITCH.run(SWITCH.java:50)
>       at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>       at java.lang.reflect.Method.invoke(Unknown Source)
>       at 
> org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
>       at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
>       at 
> org.apache.ode.bpel.rtrep.v2.RuntimeInstanceImpl.execute(RuntimeInstanceImpl.java:639)
>       at 
> org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:593)
>       at 
> org.apache.ode.bpel.engine.ODEProcess.executeContinueInstancePartnerRoleResponseReceived(ODEProcess.java:473)
>       at 
> org.apache.ode.bpel.engine.PartnerLinkPartnerRoleImpl$UnreliableInvoker$2.run(PartnerLinkPartnerRoleImpl.java:395)
>       at org.apache.ode.bpel.engine.Contexts$1.call(Contexts.java:86)
>       at org.apache.ode.bpel.engine.Contexts$1.call(Contexts.java:85)
>       at 
> org.apache.ode.bpel.engine.Contexts.execTransaction(Contexts.java:106)
>       at org.apache.ode.bpel.engine.Contexts.execTransaction(Contexts.java:83)
>       at 
> org.apache.ode.bpel.engine.BpelServerImpl$TransactedRunnable.run(BpelServerImpl.java:981)
>       at 
> org.apache.ode.bpel.engine.BpelInstanceWorker$2.call(BpelInstanceWorker.java:143)
>       at 
> org.apache.ode.bpel.engine.BpelInstanceWorker$2.call(BpelInstanceWorker.java:142)
>       at 
> org.apache.ode.bpel.engine.BpelInstanceWorker.doInstanceWork(BpelInstanceWorker.java:174)
>       at 
> org.apache.ode.bpel.engine.BpelInstanceWorker.run(BpelInstanceWorker.java:141)
>       at 
> org.apache.ode.bpel.engine.ODEProcess$ProcessRunnable.run(ODEProcess.java:1158)
>       at 
> org.apache.ode.bpel.engine.BpelServerImpl$ServerRunnable.run(BpelServerImpl.java:923)
>       at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>       at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>       at java.util.concurrent.FutureTask.run(Unknown Source)
>       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
> Source)
>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>       at java.lang.Thread.run(Unknown Source)
> ERROR - GeronimoLog.error(108) | 
> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault:
>  null
> org.apache.ode.bpel.common.FaultException: 
> {http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault:
>  null
> ==============================================
> Immediately prior to that a debug statement worked fine:
> LineNo = 2523
>       Class = class org.apache.ode.bpel.evt.ActivityExecStartEvent
> DEBUG - GeronimoLog.debug(66) | Assign.copy({OCopy {OXPath10Expression 
> $debug-output}={OXPath10Expression 
> dbg:debugString(concat(xsd:string($m-unsuccessful), ' & ', 
> xsd:string($i-unsuccessful)), 'm-unsuccessful & i-unsuccessful')}})
> DEBUG - GeronimoLog.debug(66) | Evaluating FROM expression 
> "{OXPath10Expression dbg:debugString(concat(xsd:string($m-unsuccessful), ' & 
> ', xsd:string($i-unsuccessful)), 'm-unsuccessful & i-unsuccessful')}".
> DEBUG - GeronimoLog.debug(66) | Resolving variable m-unsuccessful
> DEBUG - GeronimoLog.debug(66) | 
> VariableReadEvent:
>       Type = dataHandling
>       VarName = m-unsuccessful
>       ScopeId = 28269
>       ScopeDeclarationId = 3
>       ScopeName = __PROCESS_SCOPE:dtran
>       ParentScopesNames = [__PROCESS_SCOPE:dtran]
>       ProcessInstanceId = 28202
>       ProcessId = {http://xxx/yyy}dtran-64
>       ProcessName = {http://xxx/yyy}dtran
>       Timestamp = Thu Feb 05 13:21:49 CST 2009
>       LineNo = 30
>       
> Class = class org.apache.ode.bpel.evt.VariableReadEvent
> DEBUG - GeronimoLog.debug(66) | Resolving variable i-unsuccessful
> DEBUG - GeronimoLog.debug(66) | 
> VariableReadEvent:
>       Type = dataHandling
>       VarName = i-unsuccessful
>       ScopeId = 28269
>       ScopeDeclarationId = 3
>       ScopeName = __PROCESS_SCOPE:dtran
>       ParentScopesNames = [__PROCESS_SCOPE:dtran]
>       ProcessInstanceId = 28202
>       ProcessId = {http://xxx/yyy}dtran-64
>       ProcessName = {http://xxx/yyy}dtran
>       Timestamp = Thu Feb 05 13:21:49 CST 2009
>       LineNo = 30
>       Class = class org.apache.ode.bpel.evt.VariableReadEvent
> m-unsuccessful & i-unsuccessful -> false & false
> DEBUG - GeronimoLog.debug(66) | Expression {OXPath10Expression 
> dbg:debugString(concat(xsd:string($m-unsuccessful), ' & ', 
> xsd:string($i-unsuccessful)), 'm-unsuccessful & i-unsuccessful')} generated 
> result false & false - type=java.lang.String

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to