weblogic 数据库连接报XAResource.XAER_RMFAIL start()

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

  1. Download and apply Patch 11672297 to the relevant $ORACLE_HOME.

  2. 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值