5 Replies Latest reply on Jul 22, 2004 3:51 PM by trickard

    Oracle XA Datasources

    trickard Newbie

      Has anyone gotten XA datasources to work with Oracle 9.2.03. and Jboss 3.2.x of any variety.

        • 1. Re: Oracle XA Datasources
          Brian Wallis Master

          I know this isn't quite what you want, but we have successfully used them with Oracle 8.1.7 and JBoss 3.2.1. We are just now upgrading to using Oracle 9.2 so I hope they still work as they did. What problem are you having?

          • 2. Re: Oracle XA Datasources
            trickard Newbie

            We cant seem to talk to and 8.1.7 database or a 9.2 database. When we access a bean method with a transaction attribute of 'required' we get the following error in server.log. I dont know if I have a configuration problem or there is a bug. The 'null pointer exception' showed up yesterday in the log when I turned on tracing for the transaction manager.
            Any ideas would be greatly appreciated. I may try downing 3.2.1 and seeing if it works with my setup. These beans have been in production using JBoss 2.4.3 without problems for several years.



            2004-07-20 12:56:46,392 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
            2004-07-20 12:56:46,392 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=] status=STATUS_ACTIVE
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=] status=STATUS_ACTIVE
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=], status=STATUS_ACTIVE
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization@4a583d
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] calling sync 1, org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization@e74663
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] Before completion done, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=], status=STATUS_ACTIVE
            2004-07-20 12:56:46,407 TRACE [org.jboss.tm.TransactionImpl] Zero phase commit: No resources.
            2004-07-20 12:56:46,423 TRACE [org.jboss.tm.TransactionImpl] Committed OK, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
            2004-07-20 12:56:46,423 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
            2004-07-20 12:56:46,423 TRACE [org.jboss.tm.TxManager] tx timeout is now: 300s
            2004-07-20 12:56:52,158 TRACE [org.jboss.tm.TxManager] tx timeout is now: 0s
            2004-07-20 12:56:52,158 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=]
            2004-07-20 12:56:52,158 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=]
            2004-07-20 12:56:52,173 INFO [STDOUT] DBG: 7/20 12:56:52: 1: JNDIDataSourceConnectionPool looking up: "java:comp/env/jdbc/WarehouseDB"...
            2004-07-20 12:56:52,283 INFO [STDOUT] DBG: 7/20 12:56:52: 1: JNDIDataSourceConnectionPool got this DataSource: org.jboss.resource.adapter.jdbc.WrapperDataSource@831a91
            2004-07-20 12:56:52,283 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
            2004-07-20 12:56:52,408 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=] status=STATUS_ACTIVE
            2004-07-20 12:56:52,408 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@a17378 flags=0
            2004-07-20 12:56:52,408 TRACE [org.jboss.tm.TransactionImpl] unhandled throwable error in startResource
            java.lang.NullPointerException
            at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:132)
            at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1196)
            at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:649)
            at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:448)
            at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:502)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
            at solocup.sm.util.db.jndi_datasource_driver.JNDIDataSourceConnectionPool.getConnection(JNDIDataSourceConnectionPool.java:62)
            at solocup.sm.warehouse.WarehouseBean.getConnection(WarehouseBean.java:429)
            at solocup.sm.warehouse.WarehouseBean.ejbFindAll(WarehouseBean.java:237)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersistenceManager.java:563)
            at org.jboss.ejb.plugins.BMPPersistenceManager.findEntities(BMPPersistenceManager.java:309)
            at org.jboss.ejb.EntityContainer.find(EntityContainer.java:670)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1061)
            at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
            at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
            at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:478)
            at org.jboss.ejb.Container.invoke(Container.java:743)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:534)
            2004-07-20 12:56:52,408 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@a17378 flags=0
            2004-07-20 12:56:52,408 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//3, BranchQual=] status=STATUS_MARKED_ROLLBACK
            2004-07-20 12:56:52,408 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Could not enlist in transaction on entering meta-aware object!
            javax.transaction.SystemException: Could not register synchronization with tx: javax.transaction.RollbackException: Already marked for rollback
            at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:469)
            at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:502)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
            at solocup.sm.util.db.jndi_datasource_driver.JNDIDataSourceConnectionPool.getConnection(JNDIDataSourceConnectionPool.java:62)
            at solocup.sm.warehouse.WarehouseBean.getConnection(WarehouseBean.java:429)
            at solocup.sm.warehouse.WarehouseBean.ejbFindAll(WarehouseBean.java:237)
            at

            • 3. Re: Oracle XA Datasources
              Adrian Brock Master

              Plenty of people use OracleXA. There is even an FAQ with a checklist
              on how to configure JBoss to use it correctly.

              The error message you show is bizarre.

              It implies that xaConnection.getXAResource() is returning null when it is invoked
              in the constructor.
              http://cvs.sourceforge.net/viewcvs.py/jboss/jbosscx/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnection.java?annotate=1.3.2.12

              If it is returning null, then it is a bug in the Oracle Driver. If the connection is
              misconfigured or there is a database problem, it should be throwing an SQLException not
              returning null.

              As a first step, I'd verify that you can run the OracleXA examples that they provide.
              If that works, modify or debug the JBoss class to see what
              xaConnection.getXAResource() actually returns.

              • 4. Re: Oracle XA Datasources
                trickard Newbie

                I have read everything that I can find and have attempted to scrupulously follow the instructions. I hope this turns out to be a configuration issue but I cant find it. I believe the log from my previous post was misleading as I was using classes12.zip instead of ojdbc14.jar. I have tried every combination and neglected to replace the jar before I ran the test that resulted in the log. We are using jdk1.4 and as per Oracles instructions should be using ojdbc14 rather than classes12. I have reviewed everything again and cant find anything wrong. This same call works with the oracle-ds.xml.

                Please note the oracle error. I appreciate you reviewing the stuff it may well be something stupid I am doing but I have been looking at it off and on for a week and just cant find it. Does this imply a configuration issue and if so in what module.



                2004-07-21 12:49:55,140 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=]
                2004-07-21 12:49:55,140 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=]
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=] status=STATUS_ACTIVE
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=] status=STATUS_ACTIVE
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=], status=STATUS_ACTIVE
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization@9bfee2
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] calling sync 1, org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization@17aaeec
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] Before completion done, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=], status=STATUS_ACTIVE
                2004-07-21 12:49:55,171 TRACE [org.jboss.tm.TransactionImpl] Zero phase commit: No resources.
                2004-07-21 12:49:55,187 TRACE [org.jboss.tm.TransactionImpl] Committed OK, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=]
                2004-07-21 12:49:55,187 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//1, BranchQual=]
                2004-07-21 12:49:55,187 TRACE [org.jboss.tm.TxManager] tx timeout is now: 300s
                2004-07-21 12:49:59,015 TRACE [org.jboss.tm.TxManager] tx timeout is now: 0s
                2004-07-21 12:49:59,015 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
                2004-07-21 12:49:59,015 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=]
                2004-07-21 12:49:59,062 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
                2004-07-21 12:49:59,062 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1090432649062, new next: 1090432649062
                2004-07-21 12:50:00,218 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=] status=STATUS_ACTIVE
                2004-07-21 12:50:00,218 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@aee908 flags=0
                2004-07-21 12:50:00,328 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@aee908 flags=0
                2004-07-21 12:50:00,328 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=urbpal1//2, BranchQual=] errorCode=XAER_RMERR
                oracle.jdbc.xa.OracleXAException
                at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1159)
                at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:311)
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:132)
                at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1196)
                at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:649)
                at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:448)
                at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:502)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                at solocup.sm.util.db.jndi_datasource_driver.JNDIDataSourceConnectionPool.getConnection(JNDIDataSourceConnectionPool.java:62)
                at solocup.sm.warehouse.WarehouseBean.getConnection(WarehouseBean.java:429)
                at solocup.sm.warehouse.WarehouseBean.ejbFindAll(WarehouseBean.java:237)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersistenceManager.java:563)
                at org.jboss.ejb.plugins.BMPPersistenceManager.findEntities(BMPPersistenceManager.java:309)
                at org.jboss.ejb.EntityContainer.find(EntityContainer.java:670)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1061)
                at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
                at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
                at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:478)
                at org.jboss.ejb.Container.invoke(Container.java:743)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
                at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                at sun.rmi.transport.Transport$1.run(Transport.java:148)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                at java.lang.Thread.run(Thread.java:534)
                2004-07-21 12:50:00,359 WARN [org.jboss.tm.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
                at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1159)
                at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:311)
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:132)
                at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1196)
                at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:649)
                at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:448)
                at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:502)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
                at solocup.sm.util.db.jndi_datasource_driver.JNDIDataSourceConnectionPool.getConnection(JNDIDataSourceConnectionPool.java:62)
                at solocup.sm.warehouse.WarehouseBean.getConnection(WarehouseBean.java:429)
                at solocup.sm.warehouse.WarehouseBean.ejbFindAll(WarehouseBean.java:237)

                • 5. Re: Oracle XA Datasources
                  trickard Newbie

                  I have done as you suggested and debugged JBoss and have found that the xaResource datamember of XAManagedConnection is null. This value is set by the last statement in this function.

                   public XAManagedConnection(XAManagedConnectionFactory mcf, XAConnection xaConnection, Properties props,
                   int transactionIsolation, int psCacheSize, boolean doQueryTimeout) throws SQLException
                   {
                   super(mcf, xaConnection.getConnection(), props, transactionIsolation, psCacheSize, doQueryTimeout);
                   this.xaConnection = xaConnection;
                   xaConnection.addConnectionEventListener(new ConnectionEventListener()
                   {
                   public void connectionClosed(javax.sql.ConnectionEvent ce)
                   {
                   //only we can do this, ignore
                   }
                  
                   public void connectionErrorOccurred(javax.sql.ConnectionEvent ce)
                   {
                   SQLException ex = ce.getSQLException();
                   broadcastConnectionError(ex);
                   }
                   });
                   this.xaResource = xaConnection.getXAResource();
                   }
                  


                  xaConnection is an instance of oracle.jdbc.xa.client.OracleXAConnection. xaConnection.getXAResource is returning null on each call.

                  The datamember, m_xarsrc, in xaCOnnection is null. What might be wrong in my configuration that would not tell Oracle that an XA resource is required.