Hi Jitendra,

could you attach your bpel process, ideally the whole deployable? That
would make it easier to analyze the issue. It looks like you're using an
xpath expression in the to-spec of an assign. This only works if the
variable is prepopulated with the XML structure.

Thanks,
  Tammo


On Mon, Dec 2, 2013 at 11:16 AM, jk <[email protected]> wrote:

> Hi,
>
> I have a BPEL process deployed in ODE 1.3.6 on Tomcat 7.0.42.
> This process invokes a web service that throws an exception.
> In the process I have used a FaultHandler having a CatchAll on that invoke
> activity.
> In this CatchAll, I assign 2 variables "mailSubject" and "mailMessage" that
> I use later to send failure mail notificatrion.
> However when the web service fault message is received I get following
> exception on the tomcat console.
>
> *org.apache.ode.bpel.common.FaultException: The variable TestWSPLException
> isn't properly initialized.*
>
> I have declared the variable TestWSPLException in BPEL with the messageType
> equal to the exception thrown by the web service.
>
> Why ODE is not initializing the variable on receiving the fault?
> If I explicitely initialize the variable TestWSPLException with some
> default
> values, then I do not get any error on the tomcat console, but the actual
> failure message coming from the web service in the fault is lost and I get
> the mail with the dafault values I have set during initialization of the
> variable.
>
> I am attaching both the BPEL and WebService files.
> The complete startck trace is given below.
>
> 15:38:28,341 WARN  [ExternalService] Fault response: faultName=WSException
> faultType={http://testws1.ws.test.jk/}WSException
> <?xml version="1.0" encoding="UTF-8"?>
> <message><WSException><ns2:WSException
> xmlns:ns2="http://testws1.ws.test.jk/";
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
> "><id>0</id><message>Hel
> per failed. Reason:
> Failed</message></ns2:WSException></WSException></message>
> 15:38:28,356 ERROR [JaxenContexts] bpws:getVariableValue threw
> FaultException
> org.apache.ode.bpel.common.FaultException: The variable TestWSPLException
> isn't properly initialized.
>         at
>
> org.apache.ode.bpel.runtime.ScopeFrame.fetchVariableData(ScopeFrame.java:199)
>         at
>
> org.apache.ode.bpel.runtime.ScopeFrame.fetchVariableData(ScopeFrame.java:209)
>         at
>
> org.apache.ode.bpel.runtime.ExprEvaluationContextImpl.readVariable(ExprEvaluationContextImpl.java:96)
>         at
>
> org.apache.ode.bpel.elang.xpath10.runtime.JaxenContexts.getVariableValue(JaxenContexts.java:173)
>         at
> org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:215)
>         at org.jaxen.Context.getVariableValue(Context.java:196)
>         at
>
> org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenceExpr.java:106)
>         at
> org.jaxen.expr.DefaultPathExpr.evaluate(DefaultPathExpr.java:137)
>         at
>
> org.jaxen.expr.DefaultFunctionCallExpr.evaluateParams(DefaultFunctionCallExpr.java:195)
>         at
>
> org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:179)
>         at
> org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
>         at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:677)
>         at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:216)
>         at
>
> org.apache.ode.bpel.elang.xpath10.runtime.XPath10ExpressionRuntime.evaluate(XPath10ExpressionRuntime.java:103)
>         at
>
> org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80)
>         at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:225)
>         at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:399)
>         at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:87)
>         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         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.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:978)
>         at
>
> org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:456)
>         at
>
> org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:460)
>         at
>
> org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:450)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:523)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:517)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:289)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:244)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:517)
>         at
>
> org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:501)
>         at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> TestProcess.zip
> <http://apache-ode.996305.n3.nabble.com/file/n16976/TestProcess.zip>
> TestWS1.war <
> http://apache-ode.996305.n3.nabble.com/file/n16976/TestWS1.war>
>
>
>
> --
> View this message in context:
> http://apache-ode.996305.n3.nabble.com/Initializing-fault-variable-tp16976.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>



-- 
Tammo van Lessen - http://www.taval.de

Reply via email to