This discussion is archived
4 Replies Latest reply: May 9, 2013 12:15 AM by Hg RSS

Mediator Error handling using Fault Mgt Framework is not working

SG_SOA Newbie
Currently Being Moderated
Hi All,

I want to handle fault in Mediator using fault Management Framework. I have built one composite which will call a service,which is deployed on server. Later I shut down the web service ,resulting in the error

I have copied the fault-policies.xml and fault-bindings.xml files in the same directory structure of the composite.xml of the project.

fault-policies.xml
****************

<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies>
<faultPolicy version="2.0.1" id="ErrorhandlingApp">
<Condition >
<!-- ======================================================================
Genric Fault Policy framework :Mediator fault
====================================================================== -->
<faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
name="medns:mediatorFault">
<condition>
<test>contains($fault.mediatorErrorCode,
"TYPE_FATAL_MESH")</test>
<action ref="ora-abort"/>
</condition>
</faultName>
<!-- ======================================================================
Genric Fault Policy framework : Action
====================================================================== -->
<Actions>
<Action id="ora-abort">
<abort/>
</Action>
</Actions>
</Conditions>
</faultPolicy>
</faultPolicies>

fault-bindings.xml
******************

<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.1"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<composite faultPolicy="ErrorhandlingApp"/>
</faultPolicyBindings>

My intention is to catch/handle the fault using fault policies,but my fault -policies.xml is not working.

I followed this documentation : http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/med_faulthandling.htm

Any suggestion would be helpful to me.

Thanks in Advance,
Sharmistha
  • 1. Re: Mediator Error handling using Fault Mgt Framework is not working
    Anuj Dwivedi Guru
    Currently Being Moderated
    Sharmistha,

    Please note that -
    Fault policies are applicable to parallel routing rules only. For sequential routing rules, the fault goes back to the caller. It is the responsibility of the caller to handle the fault. If the caller is an adapter, then you can define rejection handlers on the inbound adapter to take care of the messages that error out (that is, the rejected messages). For more information about rejection handlers, see the Oracle Fusion Middleware User's Guide for Technology Adapters.
    If you are using parallel routing rule then make sure that the fault being raised has mediatorErrorCode as "TYPE_FATAL_MESH"

    Regards,
    Anuj
  • 2. Re: Mediator Error handling using Fault Mgt Framework is not working
    SG_SOA Newbie
    Currently Being Moderated
    Hi Anuj,

    Thanks for the reply.

    As per the oracle document "TYPE_FATAL_MESH: Contains fatal errors from the Service Infrastructure such as Invoke service not available." , that's why when I shut down down the service , the fault policy file should work.
    After changing the routing rule from sequential to parallel, i am facing a different kind of issue. All the faulted instance become "Recoverable" instead of terminated.

    Even i changed my code in fault-policies.xml as :

    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    name="medns:mediatorFault">
    <condition>
    <test>$fault.faultCode = "ORAMED-03303")</test>
    <action ref="ora-abort"/>
    </condition>
    </faultName>

    It is not working :(

    Fault Message :

    System Fault :
    ORAMED-03303:[Unexpected exception in case execution]Unexpected exception in request response operation "sayHello" on reference "NamePrintService". Possible Fix:Check whether the reference service is properly configured and running or look at exception for analyzing the reason or contact Oracle Support Services. Cause:javax.xml.ws.WebServiceException: Could not determine wsdl ports.

    This fault can be recovered.To recover, select this fault in the table and choose a recovery action from the recovery panel.

    Thanks in adv,
    Sharmistha
  • 3. Re: Mediator Error handling using Fault Mgt Framework is not working
    Hg Newbie
    Currently Being Moderated
    Even I am facing the same issue.
    It is going to recoverable state instead of getting terminated. In my case i am calling a java class and then terminating it.
    Please update the thread if you find the solution.

    With Regards,
    Harsh
  • 4. Re: Mediator Error handling using Fault Mgt Framework is not working
    Hg Newbie
    Currently Being Moderated
    There was an issue with the java class i was invoking through fault policy.
    I corrected it and now it is terminating the instance.

    Edited by: Hg on May 9, 2013 12:15 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points