Thursday, December 3, 2015

Oracle SOA Suite error: "Cannot call commit when using distributed transactions"

Problem:

I made a web service call to an Oracle SOA Suite 11g BPEL service, and got the following exception:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <env:Fault>
         <faultcode>env:Server</faultcode>
         <faultstring>Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'QueryInstanceTable' failed due to: DBWriteInteractionSpec Execute Failed Exception.
unknown failed. Descriptor name: [unknown].
Caused by java.sql.SQLException: Cannot call commit when using distributed transactions.
Please see the logs for the full DBAdapter logging output prior to this exception.  This exception is considered retriable, likely due to a communication failure.  To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml).  To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.  All properties are integers.
". 
The invoked JCA adapter raised a resource exception.
Please examine the above error message carefully to determine a resolution.</faultstring>
         <faultactor/>
         <detail>
            <exception>Cannot call commit when using distributed transactions</exception>
         </detail>
      </env:Fault>
   </env:Body>
</env:Envelope>


Solution:

Your connection factory is misconfigured. The data source was configured to use an XA driver.

1. Make sure that this data source is included the xaDataSourceName and not the dataSourceName property.




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


3 comments:

Anonymous said...

You sir are a life-saver :)

Anonymous said...

You are a life saver ... Thanks a million

Anonymous said...

Allah bless you my brother. Thank you very much. Dont forget to restart DB Adaptor and SOA Server node.