weblogic启动之后,点击功能报:
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource ‘JDBC Data Source-0_atm_domain’: XAER_RMFAIL : Resource manager is unavailable
javax.transaction.xa.XAException: Internal error: XAResource ‘JDBC Data Source-0_gg_domain’ is unavailable
at weblogic.transaction.internal.XAResourceDescriptor.checkResource(XAResourceDescriptor.java:948)
at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:634)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1230)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1164)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:285)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:522)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:449)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1599)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1503)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:446)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:403)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
这是XA驱动在数据库11.2.0.1-11.2.0.3版本下的bug,要么把数据库升级到11.2.0.4,要么把XA驱动换成thin。
XAER_RMERR Rather Than XAER_RMFAIL Reported For a JDBC Session When The Instance Has Aborted (Doc ID 1329800.1)
In this Document
Symptoms
Cause
Solution
References
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.1.0.7 to 11.2.0.2 [Release 11.1 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 20-Nov-2012
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
SYMPTOMS
Websphere Application Server which is using the Oracle JDBC driver to connect to an 11.1.0.7.0 database is getting an XAER_RMERR returned when the database is aborted. This causes issues for the automatic recovery of these XA transactions.
The oracle JDBC code is mapping the ORA-01092 error reported to these sessions to XAER_RMERR instead of XAER_RMFAIL
CAUSE
The cause of this issue has been identified in Bug 11672297. It caused by the fact that ORA-1092 was not mapped to XAER_RMFAIL and defaulted to XAER_RMERR.
SOLUTION
The fix is for the jdbc driver and is not a server side fix
-
Download and apply Patch 11672297 to the relevant $ORACLE_HOME.
-
You then need to replace the ojdbc*.jar file which the Application Server is using with this new jar file.
Bug 11672297 is fixed in future release 12.1 and 11.2.0.3. The fix is generic and patches are available for 11.1.0.7 and 11.2.0.2.
REFERENCES
BUG:11672297 - ORA-01092 MAPPED TO XAER_RMERR INSTEAD OF XAER_RMFAIL