Wednesday, March 23, 2011

ORABPEL-05002 when enqueueing to an AQ in SOA Suite 11g

Problem:

We have a BPEL 11g process that enqueues to an Oracle AQ. Upon executing the composite, we received the following error on the console:
<fault>
  <bpelFault>
    <faultType>0</faultType>
<bindingFault>
<part  name="summary">
<summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Enqueue' failed due to: Cannot call Connection.commit in distributed transaction. Transaction Manager will commit the resource manager when the distributed transaction is committed.". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
</part>
<part  name="detail">
<detail>Cannot call Connection.commit in distributed transaction. Transaction Manager will commit the resource manager when the distributed transaction is committed.</detail>
</part>
      <part  name="code">
        <code>null</code>
      </part>
    </bindingFault>
  </bpelFault>
</fault>

The logs showed the following error:
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=>  TestAQQueue:AQQueue [ Enqueue_ptt::Enqueue(process) ]  Could not invoke operation 'Enqueue' against the 'AQ Adapter' due to:
Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.>
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=>  TestAQQueue:AQQueue [ Enqueue_ptt::Enqueue(process) ]  Unable to roll back JCA LocalTransaction due to: Cannot call Connection.rollback in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.>
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=>  [QueueTest/TestAQQueue!1.0*soa_09a00488-a462-4463-9be9-4c10b12be92e.AQQueue]:Enqueue  One-way operation Enqueue() failed>
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.bpel.engine.ws> <BEA-000000> <got FabricInvocationException
java.sql.SQLException: Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.
        at weblogic.jdbc.wrapper.JTSConnection.commit(JTSConnection.java:643)
        at oracle.tip.adapter.aq.v2.jca.AQLocalTransaction.commit(AQLocalTransaction.java:123)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:323)
        .
        .
        .

<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.bpel.engine> <BEA-000000> <Unhandled exception for ComponentDN=QueueTest/TestAQQueue!1.0*soa_09a00488-a462-4463-9be9-4c10b12be92e/TestAQQueue CompositeInstanceId=50002 ComponentInstanceId=50004>
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.bpel.engine> <BEA-000000> <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}bindingFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Enqueue' failed due to: Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</summary>
,detail=<detail>Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.</detail>
,code=<code>null</code>}

        at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:334)
        at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1056)
        .
        .
        .
       
<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-000000> <failed to handle message
com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Enqueue' failed due to: Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.".
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.
</summary>
,detail=<detail>Cannot call Connection.commit in distributed transaction.  Transaction Manager will commit the resource manager when the distributed transaction is committed.</detail>
,code=<code>null</code>}

        at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:334)
        at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1056)
        .
        .
        .

<Mar 7, 2011 6:06:00 AM EST> <Error> <oracle.soa.bpel.engine.dispatch> <BEA-000000> <Failed to handle dispatch message ... exception ORABPEL-05002

Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: 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.

This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).

ORABPEL-05002

Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: 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.

This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).

        at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:207)
        at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88)


Solution:

Note that this process was not designed as a distributed transaction.

1. Login in to the WebLogic Server Administration Console

2. Navigate to soa_domain --> Services --> Data Sources --> (data source name) --> Configuration

3. Click on the 'Connection Pool' tab and ensure that the Driver Class Name is "oracle.jdbc.OracleDriver" and Save

4. Click on the 'Transaction' tab and uncheck "Supports Global Transactions" and Save

5. Click on the 'Control' tab Shutdown and Start the deployed instance of this data source


Applicable Version:
  • Oracle SOA Suite 11g (11.1.1.x)

Ahmed Aboulnaga

No comments: