0 Replies Latest reply on Nov 16, 2004 7:58 AM by hari krishna

    oracle.jdbc.xa.OracleXAException

    hari krishna Newbie

      Hi all,

      I'm using JBoss 4.0 and Oracle 9i.
      I'm trying to use XA data source and I'm getting the following error

      7:43:44,190 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=harikrishna-yd/2, BranchQual=, localId=2] errorCode=XAER_RMERR
      racle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
      at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:131)
      at org.jboss.tm.TransactionImpl$Resource.startResource(TransactionImpl.java:1951)
      at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:548)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:435)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:324)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:454)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:59)
      at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
      at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
      at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
      at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:467)
      at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:405)


      my oracle-xa-ds.xml file contains the following code


      <xa-datasource>
      <jndi-name>XAOracleDS</jndi-name>
      <track-connection-by-tx>true</track-connection-by-tx>
      <isSameRM-override-value>false</isSameRM-override-value>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:oracle:oci8:@infdv01</xa-datasource-property>
      <xa-datasource-property name="User">tavant_rnd</xa-datasource-property>
      <xa-datasource-property name="Password">rnd</xa-datasource-property>
      <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
      <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
      <!-- Checks the Oracle error codes and messages for fatal errors -->
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
      <no-tx-separate-pools/>
      </xa-datasource>


      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager


      should I need to do something else to use XA datasource
      Thanks in advance

      Regards,
      Hari