In Upgrading to Oracle JDBC thin driver results in SQLException: Unexpected exception while enlisting XAConnection
(WebLogic Server 10.0, oracle version ) we are getting the error listed below.
We did follow Oracle's advice to
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.
Hence the time out on the WLS needs to be modifiedIf the issue still remains it can be avoided by setting KeepXAConnTillTxComplete="true"
.
Database Product Version : Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production
JDBC Driver Name : Oracle JDBC driver
JDBC Driver Version : 11.1.0.7.0-Production
We know one option is not to use an XA connection, but in our case that is not a possibility. We defenitly need to use XA connections.
java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_PROTO start() failed on resource 'serviceDataSource': XAER_PROTO : Routine was invoked in an inproper context
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1101)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:237)
at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:696)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1183)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1116)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:275)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:508)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:435)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1407)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:426)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:383)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:339)
After so consultation from Oracle we decided to upgrade the driver to the latest driver available. This seems to have solved the issue.