1 Reply Latest reply on Dec 15, 2004 8:35 PM by Amit Basu

    allowGlobalTxnModeOnly() throws exception in XAOracleDS

    Amit Basu Newbie

      I am getting the following error on jboss4.0 rc1 and oracle while running the cmproster example with XAConnection. Basically allowGlobalTxnModeOnly() finds transactionmode != 2 and throws exception (thru decompiled code of the driver class).
      My oracle-xa-ds.xml is below:

      <xa-datasource-property name="URL">jdbc:oracle:oci8:@orasvc1</xa-datasource-
      <xa-datasource-property name="User">jboss</xa-datasource-property>
      <xa-datasource-property name="Password">password</xa-datasource-property>
      <!-- Uses the pingDatabase method to check a connection is still valid befor
      e handing it out from the pool -->
      <!-- Checks the Oracle error codes and messages for fatal errors -->
      <!-- Oracles XA datasource cannot reuse a connection outside a transaction o
      nce enlisted in a global transaction and vice-versa -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional
      ) -->



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

      The error is below:

      2004-11-19 17:58:42,045 WARN [org.jboss.tm.TransactionImpl] XAException: tx=Tra
      nsactionImpl:XidImpl[FormatId=257, GlobalId=AMIT-DEV/15, BranchQual=, localId=15
      ] errorCode=XAER_RMERR^M
      at oracle.jdbc.xa.OracleXAResource.allowGlobalTxnModeOnly(OracleXAResour
      at oracle.jdbc.xa.OracleXAResource.suspendStacked(OracleXAResource.java:
      at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:381)

        • 1. Re: allowGlobalTxnModeOnly() throws exception in XAOracleDS
          Amit Basu Newbie

          the problem happens on both jboss 4.0 and 3.2.6. So I used the OracleDS instead of the XAOracleDS (which is for 2 phase commit, which is needed if xaction spans multiple db's which is not my case),and things worked. Of course, the transition from hsqldb to Oracle 9i needed some fixing of the jbosscmp-jdbc.xml (like LCASE to LOWER, renaming attributes like desc to something else as desc is a keyword in Oracle, drop the auto-increment feature and use oracle-sequence etc).