4 Replies Latest reply on Dec 5, 2005 10:00 PM by Adrian Brock

    java.sql.SQLException: Use explicit XA call

    lee_yuki2000 Newbie

      Hi,
      I've just install jboss 3.2.3. Previously i was using jboss 3.2.1. I have this error java.sql.SQLException: Use explicit XA call when i run jboss 3.2.3. Is it i need to use the lastest jdbc driver which is ojdbc14.jar? Currently i m using classes 12 and jdk 1.3.1. As i know jboss 3.x requires jdk 1.3.1 and jboss 4.x requires jdk 1.4. Can u tell my why i have this error

      java.sql.SQLException: Use explicit XA call
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
      at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1188)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:514)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:477)
      at sqlj.runtime.profile.ref.TransactionControlProfile$RollbackStatement.executeUpdate(TransactionControlProfile.java:263)
      at sqlj.runtime.ExecutionContext$StatementFrame.executeUpdate(ExecutionContext.java:1221)
      at sqlj.runtime.ExecutionContext.executeUpdate(ExecutionContext.java:698)

      Thanks in advance

      yuki

        • 1. Re: java.sql.SQLException: Use explicit XA call
          Adrian Brock Master

          It says you are trying to control the transaction when you should be using XA.

          Do you have no-tx-separate-pools configured? If not add it.
          The option didn't exist in 3.2.1

          Oracle XA is notoriously broken, we have at least four different configurations
          to workaround/fix it:

          1) xid pad=true in conf/jboss-service.xml (it doesn't like the short versions)
          2) sameRM = false (this is just broken)
          3) track-connection-by-tx (it doesn't like efficient pooling - no interleaving)
          4) no-tx-separate-pools (it doesn't like using an xa connection outside a transaction after it has been used in a transaction and vice-versa)

          You should also enable track-statements, which will reveal where you are not closing
          statements and hence result sets. There are some subtle rules about when autocommit
          transactions end if you don't do this.

          If you have the option to use java 1.4 I would recommend it over java 1.3

          • 2. Re: java.sql.SQLException: Use explicit XA call
            lee_yuki2000 Newbie

            How do to add no-tx-separate-pools? I've follow the example on how to configure the oracle-xa-ds but it doesn't work.

            Besides that what is the difference between oracle-xa-ds and oracle-ds? Previously i was using oracle-ds in jboss 3.2.1. Now i m using jboss 3.2.3 and I had put in the wrong xml file. I shud be using oracle-ds instead of oracle-xa-ds. That's why i have this error java.sql.SQLException: Use explicit XA call. After i have change the xml, it is working.

            Thanks

            • 3. Re: java.sql.SQLException: Use explicit XA call
              gary bor Newbie

              Where exactly do we add the fixes described below?
              2) sameRM = false (this is just broken)
              3) track-connection-by-tx (it doesn't like efficient pooling - no interleaving)
              4) no-tx-separate-pools (it doesn't like using an xa connection outside a transaction after it has been used in a transaction and vice-versa)

              You should also enable track-statements