weblogic XA驱动的一个报错

 [ERROR] 2015-08-27 11:49:23:206 org.hibernate.engine.jdbc.spi.SqlExceptionHelper (SqlExceptionHelper.java:144) - 
Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_NOTA start() failed on resource 'xxx_data_source': XAER_NOTA : The XID is not valid  oracle.jdbc.xa.OracleXAException

解决方法:找到设置XA事务处理超时选项打钩,设置XA事务处理超时设置为0,点击保存即可。

转到底部转到底部

In this Document

Symptoms
 Cause
 Solution
 References


APPLIES TO:

Oracle SOA Suite - Version 11.1.1.3.0 and later
Information in this document applies to any platform.

SYMPTOMS

WebLogic Datasource errors appearing in SOA server log:

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


ERROR
-----------------------

2011-12-16T00:01:33.791+10:30] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.dispatch] [tid: orabpel.invoke.pool-4.thread-13] [userId: <anonymous>] [ecid: 0000JH1ufkSD4iP5Mf9Die1EuSQh0001xR,0:7:100000066] [APP: soa-infra] [dcid: 5f7dda500ef01573:-39ff5479:1344130a57d:-7ffc-0000000000000011] <DispatchHelper::handleMessage> failed to handle message[[
javax.ejb.TransactionRolledbackLocalException: Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: 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
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1532)
Error Code: 0
Internal Exception: 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
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1532)
Error Code: 0
Caused by: 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
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1532)
javax.ejb.TransactionRolledbackLocalException: Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_NOTA sta

 

CAUSE

According to XA protocol it requires that all the SQL statements for one and the same transaction branch be issued between an xa_start() and an xa_end() call.
In case of a distributed transaction, every individual database represents one XAResource that will have one transaction branch in one distributed transaction. Now the WebLogic Server transaction manager considers every JDBC DataSource as a separate XAResource, which means it cannot evaluate if different connection pools or data sources point to the same database.

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

SOLUTION

The solution is for the JDBC Connection Pools 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).

a. Log into WLS Administration Console
b. Click on Services -> Data Sources and then click on data source in question
c. Click on Transaction Tab
d. Click on check box next to "Set XA Transaction Timeout"
e. Make sure that "XA Transaction Timeout" has a value of 0
f. Save the configuration.
g. Bounce SOA


A general rule to follow is to make sure that WebLogic Server JTA timeout (either global, specific to an EJB or for individual 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值