3 Replies Latest reply on Oct 2, 2006 5:43 PM by Jean-Louis Vila

    JBoss and XA distributed transactions

    Stoyan Petrov Newbie

      Hi All,

      I use Oracle Database 10g Express Edition + jboss-4.0.4.GA-Patch1
      and i try to use XA distributed transaction, but i have strange error for me:

      21:36:44,753 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14] errorCode=XAER_RMERR
      oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:937)

      21:36:44,769 WARN [TransactionImpl] xa error: -3 (A resource manager error has occured in the transaction branch.); oracle error: 6550; oracle sql error: 0;
      oracle.jdbc.xa.OracleXAException

      21:36:44,800 WARN [SettingsFactory] Could not obtain connection metadata
      org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14]); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14]))

      Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=stoyan/14, BranchQual=, localId=14])

      I see support JBoss page:
      http://wiki.jboss.org/wiki/Wiki.jsp?page=IHaveProblemsWithOracleXA

      I don't understand wery well:
      Configuring Oracle Database for XA Support You can configure Oracle database to support XA resources.
      Because when i unstall my db i cann't found any about XA support.I think by default
      oracle after 9.3 ver support XA transactions

      Some ideas? please

      my xxx-ds.xml is: (and i put class12.jar in jboss/server/default/lib from my oracle client)
      <?xml version="1.0" encoding="UTF-8"?>

      <xa-datasource>
      <jndi-name>OracleDSXXX</jndi-name>
      <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:@my_vmwareoa</xa-datasource-property>
      <xa-datasource-property name="User">admin</xa-datasource-property>
      <xa-datasource-property name="Password">12345</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/>

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

      <type-mapping>Oracle9i</type-mapping>

      </xa-datasource>



      Thanks in advance!
      Stoyan

        • 1. Re: JBoss and XA distributed transactions
          Wanderlei Souza Newbie

          Man, do you have the "jboss-xa-jdbc.rar" file in deploy dir? I think that is necessary for distributed transactions in 4.0.4GA. (this file is only avaliable in instalation "ALL").

          If you intend use EJB3, first install using the jar installer, choose EJB3 (or EJB3-Cluter). After, install "ALL" version in other directory structure and then copy the "jboss-xa-jdbc.rar" to EJB3 instalation (deploy dir).

          • 2. Re: JBoss and XA distributed transactions
            Stoyan Petrov Newbie

             

            "wandi" wrote:
            Man, do you have the "jboss-xa-jdbc.rar" file in deploy dir? I think that is necessary for distributed transactions in 4.0.4GA. (this file is only avaliable in instalation "ALL").

            If you intend use EJB3, first install using the jar installer, choose EJB3 (or EJB3-Cluter). After, install "ALL" version in other directory structure and then copy the "jboss-xa-jdbc.rar" to EJB3 instalation (deploy dir).


            Thanks Wandi

            Yes i have "jboss-xa-jdbc.rar" file in deploy dir. When i installed my JBoss i choiced "ALL" version

            Other ideas?

            • 3. Re: JBoss and XA distributed transactions
              Jean-Louis Vila Newbie

              We had the same problem (10g XE + JBoss 4.0.2) and we solve it.
              The problem is not the JBoss version or configuration mistakes but the version of oracle driver.

              Take care because there are a lot of ojdbc14.jar versions !!! You have to check manifest file in jar file.

              This error came with a 9.0.2.0.0 version of ojdbc14.jar and we change it with a 10.1.0.4.0 version (inside 10g XE distibution <install ORA10gXE>\app\oracle\product\10.2.0\server\jdbc\lib) and the error disappear !!

              Hope that help,
              Jean-Louis