You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Sebastien Mosser <mo...@polytech.unice.fr> on 2008/01/15 16:54:04 UTC
FaultHandler troubles
Hi !
New week, new trouble !
I'd like to implement a try/catch business process, just for test purpose.
So, I deploy an Axis Web services called 'FaultyService', able to throw
exception on demand (input != 0 => return an Object, input = 0 => throw
a FaultyException). And a business process wich invoke FaultyService.
I basically define a catchAll in a faultHandler at process level, witch
rethrow the exception :
<bpws:faultHandlers>
<bpws:catchAll>
<bpws:sequence>
<bpws:rethrow/>
</bpws:sequence>
</bpws:catchAll>
</bpws:faultHandlers>
When I invoke the process, asking for an exception to be thrown, well
... nothing happend, and it end in a timeout. The FaultyException is
thrown, as I see it at SOAPMonitor Level in Axis2 :
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Here is a FaultyException throwed by
FaultyService</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
In tomcat logs, I get the following error :
ERROR - GeronimoLog.error(108) | An exception occured while executing an
isolated transaction, the transaction is going to be abandoned.
java.lang.NullPointerException
at
org.apache.ode.axis2.ExternalService$4.call(ExternalService.java:330)
at
org.apache.ode.axis2.ExternalService$4.call(ExternalService.java:327)
at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179)
at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleScheduler.java:160)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
I try to deploy the svn test process, but it fails with a lot of compile
errors.
I used :
http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/
(it requires probeService.wsdl I get from here :
http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ProbeService/probeService.wsdl)
I think I miss something about Fault handling in BPEL :(
--
Sebatian
Re: FaultHandler troubles
Posted by Sebastien Mosser <mo...@polytech.unice.fr>.
Alex Boisvert a écrit :
> Hi Sebastien,
>
> You're not getting the result you expect because of a bug -- the
> NullPointerException you reported. What happens is the process is suspended
> as a result of the NPE because this is not an expected error condition
> [1]. Incidentally, you get a timeout from the client because no response
> is sent back. We need to prevent the NPE from happening.
Okay. Following [1], I add a
<ext:failureHandling xmlns:ext="http://ode.apache.org/activityRecovery">
<ext:faultOnFailure>true</ext:faultOnFailure>
</ext:failureHandling>
At process level. Nothing change :'(. I've set 'in-memory' to true, due
to a very slow access to my database (and a silly bug with Derby on my
computer).
And, by the way, can you give me some explanations about following lines :
When in recovery mode, you can recover the activity in one of three ways:
* Retry -- Retry the activity manually. You can repeat this any
number of times until the activity completes or faults.
* Fault -- Causes the activity to throw the activityFailure fault.
* Cancel -- Cancels the activity. The activity completes
unsuccessfully: without changing the state of variables, by setting the
status of all its source links to false, and without installing a
compensation handler.
Activity recovery is performed individually for each activity
instance, and does not affect other activities executing in the same
process. While the activity is in the FAILURE state, the process
instance remains in the ACTIVE state and may execute other activities
from parallel flows and event handlers.
> Second, the test cases are not meant to be deployed on a standard Ode
> installation. They run in a slightly different environment for testing BPEL
> which alleviates some of the normal configuration required for "real"
> processes.
As I was able to run the Xsl test, I tried ;-).
cheers,
--
Sebastian
Re: FaultHandler troubles
Posted by Alex Boisvert <bo...@intalio.com>.
Hi Sebastien,
You're not getting the result you expect because of a bug -- the
NullPointerException you reported. What happens is the process is suspended
as a result of the NPE because this is not an expected error condition
[1]. Incidentally, you get a timeout from the client because no response
is sent back. We need to prevent the NPE from happening.
Second, the test cases are not meant to be deployed on a standard Ode
installation. They run in a slightly different environment for testing BPEL
which alleviates some of the normal configuration required for "real"
processes.
Hope this helps your understanding. We'll fix the NPE shortly!
alex
[1] http://ode.apache.org/activity-failure-and-recovery.html
On 1/15/08, SŽebastien Mosser <mo...@polytech.unice.fr> wrote:
>
> Hi !
>
> New week, new trouble !
>
> I'd like to implement a try/catch business process, just for test purpose.
>
> So, I deploy an Axis Web services called 'FaultyService', able to throw
> exception on demand (input != 0 => return an Object, input = 0 => throw
> a FaultyException). And a business process wich invoke FaultyService.
>
>
> I basically define a catchAll in a faultHandler at process level, witch
> rethrow the exception :
> <bpws:faultHandlers>
> <bpws:catchAll>
> <bpws:sequence>
> <bpws:rethrow/>
> </bpws:sequence>
> </bpws:catchAll>
> </bpws:faultHandlers>
>
> When I invoke the process, asking for an exception to be thrown, well
> ... nothing happend, and it end in a timeout. The FaultyException is
> thrown, as I see it at SOAPMonitor Level in Axis2 :
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>Here is a FaultyException throwed by
> FaultyService</faultstring>
> <detail />
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
> In tomcat logs, I get the following error :
> ERROR - GeronimoLog.error(108) | An exception occured while executing an
> isolated transaction, the transaction is going to be abandoned.
> java.lang.NullPointerException
> at
> org.apache.ode.axis2.ExternalService$4.call(ExternalService.java:330)
> at
> org.apache.ode.axis2.ExternalService$4.call(ExternalService.java:327)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(
> SimpleScheduler.java:179)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler$1.call(
> SimpleScheduler.java:160)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
> :675)
> at java.lang.Thread.run(Thread.java:613)
>
> I try to deploy the svn test process, but it fails with a lot of compile
> errors.
> I used :
>
> http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestFaultHandlers/
> (it requires probeService.wsdl I get from here :
>
> http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ProbeService/probeService.wsdl
> )
>
> I think I miss something about Fault handling in BPEL :(
>
> --
> Sebatian
>