Friday, November 27, 2015

Deployment Error - Oracle SOA suite

ISSUE:


Below error was observed in SOA logs at time of deployment.

<<
<Nov 19, 2015 2:13:54 PM AST> <Error> <oracle.soa.bpel.system> <BEA-000000> <Error while invoking bean "cube delivery": Error not handled.
failure to handle a error thrown from a scope, by any blocks in the scope chain.
This exception occurred because the error thrown in the BPMN flow was not handled by any error handlers and reached the top-level scope.
A top-level error handler should be added to the flow to handle errors not caught from within the flow.

java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_NOTA start() failed on resource 'SOADataSource_base_domain': XAER_NOTA : The XID is not valid
oracle.jdbc.xa.OracleXAException
        at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1616)
        at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:336)
        at weblogic.jdbc.jta.DataSource.start(DataSource.java:790)
        at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1247)
        at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1180)
        at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:300)
        at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:561)
        at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:488)
        at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1673)
>>

REASON:


This error can be seen when the transaction has timed out but the exception is not caught by the application.

SOLUTION:


The solution is to set the XASetTransactionTimeout to true and XATransactionTimeout to zero (when this parameter is set to zero, the XAResource Session Timeout will be set to the global transaction timeout).

Step 1) Log into Weblogic Admin Console
Step 2) Click on Services -> Data Sources and then click on data source you need to change(SOA Data Source) in above case.
Step 3) Click on Transaction Tab
Step 4) Click on check box next to "Set XA Transaction Timeout"
Step 5) Make sure that "XA Transaction Timeout" has a value of 0
Step 6) Save and Activate changes.
Step 7) Bounce SOA Server

Please follow this below golden rule while setting timeout parameter:

syncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout (JTA timeout) < XA timeout < distributed lock timeout


No comments:

Post a Comment

Other Posts