oracle RAD 8 例外

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6348648/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 23:58:08  来源:igfitidea点击:

RAD 8 Exception

javaoraclejmsxaibm-rad

提问by Gopal

Please help me understand the possible causes of this exception, or better still how to fix it?

请帮助我了解此异常的可能原因,或者更好的是如何解决它?

The exception stack trace is as follows:

异常堆栈跟踪如下:

com.ibm.ws.Transaction.XAResourceNotAvailableException: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:399)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:433)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.run(J2CXAResourceFactory.java:237)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:185)
    ... 7 more

[6/14/11 15:01:02:685 EDT] 00000009 WSRdbDataSour W   DSRA8023W: "" is not a valid option for oracleRACXARecoveryDelay. oracleRACXARecoveryDelay will default to 0.
[6/14/11 15:01:05:185 EDT] 00000009 InternalGener I   DSRA8203I: Database product name : Oracle
[6/14/11 15:01:05:185 EDT] 00000009 InternalGener I   DSRA8204I: Database product version : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[6/14/11 15:01:05:185 EDT] 00000009 InternalGener I   DSRA8205I: JDBC driver name  : Oracle JDBC driver
[6/14/11 15:01:05:185 EDT] 00000009 InternalGener I   DSRA8206I: JDBC driver version  : 11.2.0.2.0
[6/14/11 15:01:05:185 EDT] 00000009 InternalOracl I   DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper.
[6/14/11 15:01:05:185 EDT] 00000009 InternalOracl W   DSRA7041W: You must use the Oracle11gDataStoreHelper class or a subclass of that data store helper when you configure a data source to use this JDBC driver: Oracle 11g JDBC driver
[6/14/11 15:01:05:185 EDT] 00000009 WSRdbDataSour I   DSRA8208I: JDBC driver type  : ""
[6/14/11 15:01:05:185 EDT] 00000009 WSRdbXaResour E   DSRA0304E:  XAException occurred. XAException contents and details are: The cause is               : null.
[6/14/11 15:01:05:185 EDT] 00000009 WSRdbXaResour E   DSRA0302E:  XAException occurred.  Error code is: XAER_RMERR (-3).  Exception is: <null>
[6/14/11 15:01:05:185 EDT] 00000009 XARminst      E   WTRN0037W: The transaction service encountered an error on an xa_recover operation. The resource was com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@19b619b6. The error code was XAER_RMERR. The exception stack trace follows: javax.transaction.xa.XAException
    at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
    at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:1086)
    at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:141)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:602)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)

[6/14/11 15:01:05:185 EDT] 00000009 J2CXAResource W   J2CA0061W: Error creating XA Connection and Resource java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.run(J2CXAResourceFactory.java:237)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:185)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:433)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)

[6/14/11 15:01:05:185 EDT] 00000009 XARecoveryDat W   WTRN0005W: The XAResource for a transaction participant could not be recreated and transaction recovery may not be able to complete properly. The resource was J2CXAResourceInfo : 
cfName = JMS$null$JMSManagedConnection@0
configProps = [Deployed Resource Adapter Properties]
    TransactionResourceRegistration      java.lang.String    dynamic
    InactiveConnectionSupport    java.lang.Boolean   true
    mcfClassname     java.lang.String    com.ibm.ejs.jms.GenericJMSManagedQueueConnectionFactory
    mcfUserName      java.lang.String    fcuser
    mcfPassword      java.lang.String    {xor}Kiw6LTk8
    mcfConnectorName     java.lang.String    JMS$null
    mcfProviderURL   java.lang.String    jnp://localhost:1099
    mcfContextFactoryClassname   java.lang.String    org.jnp.interfaces.NamingContextFactory
    mcfJndiPath      java.lang.String    XAConnectionFactory

dd = [Resource Adapter DD]
    ManagedConnectionFactory Class Name: com.ibm.ejs.jms.JMSManagedQueueSessionFactory
    Connection Factory Interface Name:   NO_CF_INTERFACE_SPECIFIED
    Transaction Support:                 2
    Reauthentication Support:            false

dsProps = {java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
mcfProps = null
mmProps = null
mbeanProps = null
cmConfig = 
[Resource-ref CMConfigData key items]

    res-sharing-scope:        1 (UNSHAREABLE)
    res-isolation-level:      0 (TRANSACTION_NONE)
    res-auth:                 1 (APPLICATION)
    isCMP1_x:                 false (not CMP1.x)
    isJMS:                    true (JMS)
    commitPriority            0
    loginConfigurationName:   null
    loginConfigProperties:    null
    Resource ref name:        not set

[Resource-ref non-key items]

    J2EE Name:                not set
    isCMP:                    false (not set)
    isWar:                    false (looked-up component was not a War module)

recoveryClasspath = null
raKey = null
. The exception stack trace follows: com.ibm.ws.Transaction.XAResourceNotAvailableException: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:399)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:433)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.run(J2CXAResourceFactory.java:237)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:185)
    ... 7 more

[6/14/11 15:01:05:201 EDT] 00000009 WSRdbDataSour W   DSRA8023W: "" is not a valid option for oracleRACXARecoveryDelay. oracleRACXARecoveryDelay will default to 0.
[6/14/11 15:01:07:701 EDT] 00000009 InternalGener I   DSRA8203I: Database product name : Oracle
[6/14/11 15:01:07:701 EDT] 00000009 InternalGener I   DSRA8204I: Database product version : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[6/14/11 15:01:07:701 EDT] 00000009 InternalGener I   DSRA8205I: JDBC driver name  : Oracle JDBC driver
[6/14/11 15:01:07:701 EDT] 00000009 InternalGener I   DSRA8206I: JDBC driver version  : 11.2.0.2.0
[6/14/11 15:01:07:701 EDT] 00000009 InternalOracl I   DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper.
[6/14/11 15:01:07:701 EDT] 00000009 InternalOracl W   DSRA7041W: You must use the Oracle11gDataStoreHelper class or a subclass of that data store helper when you configure a data source to use this JDBC driver: Oracle 11g JDBC driver
[6/14/11 15:01:07:701 EDT] 00000009 WSRdbDataSour I   DSRA8208I: JDBC driver type  : ""
[6/14/11 15:01:07:701 EDT] 00000009 WSRdbXaResour E   DSRA0304E:  XAException occurred. XAException contents and details are: The cause is               : null.
[6/14/11 15:01:07:701 EDT] 00000009 WSRdbXaResour E   DSRA0302E:  XAException occurred.  Error code is: XAER_RMERR (-3).  Exception is: <null>
[6/14/11 15:01:07:701 EDT] 00000009 XARminst      E   WTRN0037W: The transaction service encountered an error on an xa_recover operation. The resource was com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@15411541. The error code was XAER_RMERR. The exception stack trace follows: javax.transaction.xa.XAException
    at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
    at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:1086)
    at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:141)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:602)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)

[6/14/11 15:01:07:716 EDT] 00000009 J2CXAResource W   J2CA0061W: Error creating XA Connection and Resource java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.run(J2CXAResourceFactory.java:237)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:185)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:433)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)

[6/14/11 15:01:07:716 EDT] 00000009 XARecoveryDat W   WTRN0005W: The XAResource for a transaction participant could not be recreated and transaction recovery may not be able to complete properly. The resource was J2CXAResourceInfo : 
cfName = JMS$null$JMSManagedConnection@0
configProps = [Deployed Resource Adapter Properties]
    TransactionResourceRegistration      java.lang.String    dynamic
    InactiveConnectionSupport    java.lang.Boolean   true
    mcfClassname     java.lang.String    com.ibm.ejs.jms.GenericJMSManagedQueueConnectionFactory
    mcfUserName      java.lang.String    fcuser
    mcfPassword      java.lang.String    {xor}Kiw6LTk8
    mcfConnectorName     java.lang.String    JMS$null
    mcfProviderURL   java.lang.String    jnp://localhost:1099
    mcfContextFactoryClassname   java.lang.String    org.jnp.interfaces.NamingContextFactory
    mcfJndiPath      java.lang.String    XAConnectionFactory

dd = [Resource Adapter DD]
    ManagedConnectionFactory Class Name: com.ibm.ejs.jms.JMSManagedQueueSessionFactory
    Connection Factory Interface Name:   NO_CF_INTERFACE_SPECIFIED
    Transaction Support:                 2
    Reauthentication Support:            false

dsProps = {java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
mcfProps = null
mmProps = null
mbeanProps = null
cmConfig = 
[Resource-ref CMConfigData key items]

    res-sharing-scope:        1 (UNSHAREABLE)
    res-isolation-level:      0 (TRANSACTION_NONE)
    res-auth:                 1 (APPLICATION)
    isCMP1_x:                 false (not CMP1.x)
    isJMS:                    true (JMS)
    commitPriority            0
    loginConfigurationName:   null
    loginConfigProperties:    null
    Resource ref name:        not set

[Resource-ref non-key items]

    J2EE Name:                not set
    isCMP:                    false (not set)
    isWar:                    false (looked-up component was not a War module)

recoveryClasspath = null
raKey = null
. The exception stack trace follows: com.ibm.ws.Transaction.XAResourceNotAvailableException: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:399)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:433)
    at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:559)
    at com.ibm.tx.jta.PartnerLogTable.recover(PartnerLogTable.java:389)
    at com.ibm.tx.jta.RecoveryManager.resync(RecoveryManager.java:1523)
    at com.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:127)
    at com.ibm.tx.jta.RecoveryManager.run(RecoveryManager.java:2200)
    at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.Exception: Parameter xaResInfo lacks an RA wrapper and an RA wrapper could not be resolved using RA key.
    at com.ibm.ejs.j2c.J2CXAResourceFactory.run(J2CXAResourceFactory.java:237)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:185)
    ... 7 more

[6/14/11 15:01:07:716 EDT] 00000009 WSRdbDataSour W   DSRA8023W: "" is not a valid option for oracleRACXARecoveryDelay. oracleRACXARecoveryDelay will default to 0.

回答by MrChick

Could it be your Oracle or Java process was shutdown without completing a transaction? which is it trying to recover but can't, see IBM - WebSphere Application Server fails to start with XAException: XAER_RMERR (xa_recover)

可能是您的 Oracle 或 Java 进程在没有完成事务的情况下就关闭了?它试图恢复但无法恢复,请参阅IBM - WebSphere Application Server 无法以 XAException 启动:XAER_RMERR (xa_recover)

snippet

片段

This means that the transaction manager could not perform an XA recover operation, and Oracle returned an XAER_RMERR error to indicate that WebSphere did not close its connection with Oracle properly. When WebSphere Application Server attempts to reestablish the connection, Oracle must rollback any transactions that were in progress, but the Oracle user that WebSphere uses to log into the database (scott, in this example) cannot perform the recovery.

这意味着事务管理器无法执行 XA 恢复操作,并且 Oracle 返回 XAER_RMERR 错误以指示 WebSphere 没有正确关闭其与 Oracle 的连接。当 WebSphere Application Server 尝试重新建立连接时,Oracle 必须回滚任何正在进行的事务,但 WebSphere 用于登录数据库的 Oracle 用户(在本例中为 scott)无法执行恢复。

The solution is to give the Oracle user permission to perform the recovery, specifically to access the internal Oracle tables used to manage recovery.

解决方案是授予 Oracle 用户执行恢复的权限,特别是访问用于管理恢复的内部 Oracle 表。

To do this:

去做这个:

  • Login in to SQL Plus as SYSOPER or SYSDBA. Run the following command:
  • 以 SYSOPER 或 SYSDBA 身份登录到 SQL Plus。运行以下命令:

grant select on DBA_PENDING_TRANSACTIONS to PUBLIC

grant select on DBA_PENDING_TRANSACTIONS to PUBLIC

Note: If you don't want to grant this permission to all users, specify only the user listed in the error (in this example, scott).

注意:如果您不想将此权限授予所有用户,请仅指定错误中列出的用户(在本例中为 scott)。

  • Restart the database. Restart the
  • WebSphere server.
  • 重新启动数据库。重新启动
  • WebSphere 服务器。

回答by Rodrigo Camargo

Just delete the two log files from this path:

只需从此路径中删除两个日志文件:

[your_project]/.metadata/.plugins/com.ibm.etools.server.core/tmp0/tranlog/server1/transaction

[your_project]/.metadata/.plugins/com.ibm.etools.server.core/tmp0/tranlog/server1/transaction

There are two folders there: partnerlog and tranlog. Inside, there are two log files, log1 and log2. Delete them both. Then restart your websphere.

那里有两个文件夹:partnerlog 和 tranlog。在里面,有两个日志文件,log1 和 log2。删除它们两个。然后重新启动您的 websphere。

回答by Peter Wippermann

A solution as well as the work around mentioned above for the javax.transaction.xa.XAExceptionare described in this article from IBM's product support: http://www-01.ibm.com/support/docview.wss?uid=swg21196663

一个解决方案,以及上面提到的各地工作javax.transaction.xa.XAException在这篇文章中,从IBM的产品支持说明: http://www-01.ibm.com/support/docview.wss?uid=swg21196663