Follow Us on Twitter

Error Handling In SOA Suite 11G

by Cyril Hak on November 3, 2009 · 5 comments

This blog describes how to use Fault Management Framework in SOA suite 11G.

For error handling of our Mediator we just need two files the fault-policies.xml and the fault-bindings.xml. The files must be placed inside your SOA Composite project directory.

The fault-binding.xml file associates fault policies with composites or components.

In the next example we just put a reference to a fault policy named MyFaultHandler for our BPEL component.

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

The fault-policies file contains fault conditions and actions.

The following example shows the faultpolicy for MyFaultHandler. The faultpolicy handles all remote faults that comes from my bpel-process. The action that must be done when a remote fault occurs is called ora-human-intervention. In the ora-human-intervention action we place the <humanIntervention/> tag which will cause the process to be pauzed until it is handled by someone in the bpel-console. Other predefined actions that can be used are for example retry or abort. All options can be found in the fault-policy.xsd file.

The schema’s (xsd’s) for the fault-policy and fault-binding files can be found in the Oracle Fusion Middleware Developer’s Guide for Oracle SOA Suite 11g.

<faultpolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <faultpolicy version="2.1.3" id="MyFaultHandler">
    <conditions>
      <!-- Remote Fault Handler -->
      <faultname xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
                 name="bpelx:remoteFault">
        <condition>
          <action ref="ora-human-intervention"/>
        </condition>
      </faultName>
    </Conditions>
    <actions>
      <!-- Human Intervention -->
      <action id="ora-human-intervention">
        <humanIntervention/>
      </Action>
    </Actions>
  </faultPolicy>
</faultPolicies>

The following screenshots show the flow trace of a BPEL-process instance with a remoteFault.

BPEL Process Instance Details

BPEL Process Instance Details

BPEL Error Flow

BPEL Error Flow Trace

As you can see the error can be recovered.

Error Handling In SOA Suite 11G, 3.7 out of 5 based on 3 ratings

Ratings:
VN:F [1.9.22_1171]
Rating: 3.7/5 (3 votes cast)
Tags: , , ,

{ 3 comments… read them below or add one }

Sundar Rajan July 30, 2010 at 2:32 pm

Hi,

There is one more option to place the files for re-use that is placing the files in MDS. can you please brief on how to place the files in MDS. Adding to it suppose if action ora-java is selected where to place the .class file

Regards,
Sundar

Reply

Víctor December 10, 2010 at 9:55 pm

Hi Cyril, good post and i hope you can help me with the next issue

I did create both files fault-bindings.xml and fault-policies.xml at the same place where composite.xml is. I kow is not supposed to be required, but i added the next properties to the composite

fault-policies.xml
fault-bindings.xml

I bound the component(bpel) and the composite to the fault policie
I put an invoke activity to a service and made sure it was not accesible.

Nevertheless, the framework is not catching the fault. this is wath i get from the logs

—–


INFO: FaultPoliciesParser.parsePolicies ——->Begin Parsing of policy file
< Unhandled exception for ComponentDN=Utiles/SE_SUSPEND_PROCESS!1.02*soa_c04e2082-9b8b-49be-a14f-b6be51be3141/SE_SUSPEND_PROCESS CompositeInstanceId=4150129 ComponentInstanceId=7960113>
< This exception occurred because the fault thrown in the BPEL flow was not handled by any fault handlers and reached the top-level scope. Root cause : com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
parts: {{
summary=oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): http://middes02.sky:10002/soa-infra/services/Utiles/SE_INT_MAIL_001/SE_INT_MAIL_001_WS
,detail=Unable to access the following endpoint(s): http://middes02.sky:10002/soa-infra/services/Utiles/SE_INT_MAIL_001/SE_INT_MAIL_001_WS
,code=404}
>
< failed to handle message
ORABPEL-02055

Fault not handled.
failure to handle a fault thrown from a scope, by any blocks in the scope chain.
This exception occurred because the fault thrown in the BPEL flow was not handled by any fault handlers and reached the top-level scope.
A top-level fault handler should be added to the flow to handle faults not caught from within the flow.

—–

and this are my files

fault-policies.xml
—–

5
15

—–

Fault-bindings.xsd
—–

SE_SUSPEND_PROCESS

—–

well, that’s my problem. Greetings from México and Thanks in advance

Víctor

Reply

Sahitya April 6, 2011 at 4:09 pm

java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: oracle.fabric.common.PolicyEnforcementException: no transaction to be exported! at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:575) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:157) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:90) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: oracle.fabric.common.PolicyEnforcementException: no transaction to be exported! at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:260) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:985) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:729) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:569) … 69 more Caused by: javax.xml.ws.WebServiceException: oracle.fabric.common.PolicyEnforcementException: no transaction to be exported! at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:784) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:234) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:105) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:256) … 72 more Caused by: oracle.fabric.common.PolicyEnforcementException: no transaction to be exported! at oracle.integration.platform.common.InterceptorChainImpl.createPolicyEnforcementException(InterceptorChainImpl.java:163) at oracle.integration.platform.common.InterceptorChainImpl.processRequest(InterceptorChainImpl.java:99) at oracle.integration.platform.common.mgmt.InterceptorChainManager.processRequest(InterceptorChainManager.java:232) at oracle.j2ee.ws.client.mgmt.runtime.SuperClientInterceptorPipeline.handleRequest(SuperClientInterceptorPipeline.java:96) at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:571) at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:549) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:736) … 75 more Caused by: javax.xml.ws.WebServiceException: no transaction to be exported! at weblogic.wsee.wstx.wsat.tube.WSATClientHelper.doHandleRequest(WSATClientHelper.java:40) at oracle.j2ee.ws.client.transaction.OutboundWSATDelegate.doRequest(OutboundWSATDelegate.java:26) at oracle.j2ee.ws.client.transaction.ClientWSATInterceptor.processRequest(ClientWSATInterceptor.java:134) at oracle.integration.platform.common.InterceptorChainImpl$1.run(InterceptorChainImpl.java:173) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at oracle.integration.platform.common.InterceptorChainImpl.processRequestAsSubject(InterceptorChainImpl.java:171) at oracle.integration.platform.common.InterceptorChainImpl.processRequest(InterceptorChainImpl.java:88) … 80 more

This is the error I got when doing the testing with the deployed project ,it is repeated with all the DB operations like select ,insert ,delete ,update while testing ….
Cannot understand what it is about …
Can any body help me out with this pls to know the solution please
its urgent ,pls help me …

Reply

Leave a Comment

 

{ 2 trackbacks }

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter