8 Replies Latest reply on May 20, 2002 12:00 PM by Georg Schmid

    Oracle XA data source

    Jeffrey Jeffrey Newbie

      I've configurated an oracle-xa-service.xml to use oracle.jdbc.xa.client.OracleXADataSource as the data source class, and launch JBOSS 3.0 RC1 without error. But when my CMP2.0 entity bean is deployed, JBOSS has problem creating the corresponding table on Oracle DB; the transaction is rolled back and the exception of "xaRes not enlisted" is raised.

      Although there's no error at JBOSS start-up stage, I doubt if the Oracle XA connection setting is established properly. Is there any quick way to check the status and see detailed error msg for the JBOSS CMP managed JDBC connections? Also, does anybody have a working version of oracle-service.xml with XA data source?

      Here's the excerpt of errors from my server.log, with the TRACE level msg turned on for package org.jboss.tm and org.jboss.ejb.plugins.cmp:


      2002-04-26 15:53:39,284 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
      2002-04-26 15:53:39,327 TRACE [org.jboss.tm.TxCapsule] enlistResource(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=] status=STATUS_ACTIVE
      2002-04-26 15:53:39,328 TRACE [org.jboss.tm.TxCapsule] startResource(OracleXid [FormatId=257, GlobalId=tiger//0, BranchQual=1]) entered: oracle.jdbc.xa.client.OracleXAResource@6ac7c8 flags=0
      2002-04-26 15:53:39,517 TRACE [org.jboss.tm.TxCapsule] startResource(OracleXid [FormatId=257, GlobalId=tiger//0, BranchQual=1]) leaving: oracle.jdbc.xa.client.OracleXAResource@6ac7c8 flags=0
      2002-04-26 15:53:39,522 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.Sequence] Executing SQL: CREATE TABLE MEXSEQUENCE (keyName VARCHAR2(255) NOT NULL, keyIndex NUMBER(10) NOT NULL, CONSTRAINT PK_MEXSEQUENCE PRIMARY KEY (keyName))
      2002-04-26 15:53:39,568 TRACE [org.jboss.tm.TxCapsule] delistResource(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=] status=STATUS_ACTIVE
      2002-04-26 15:53:39,568 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.Sequence] Could not create table MEXSEQUENCE
      2002-04-26 15:53:39,569 TRACE [org.jboss.tm.TxCapsule] rollback(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=] status=STATUS_ACTIVE
      2002-04-26 15:53:39,569 TRACE [org.jboss.tm.TxCapsule] endresources(0): state=1
      2002-04-26 15:53:39,569 TRACE [org.jboss.tm.TxCapsule] endResource(OracleXid [FormatId=257, GlobalId=tiger//0, BranchQual=1]) entered: oracle.jdbc.xa.client.OracleXAResource@6ac7c8 flag=67108864
      2002-04-26 15:53:39,578 TRACE [org.jboss.tm.TxCapsule] endResource(OracleXid [FormatId=257, GlobalId=tiger//0, BranchQual=1]) leaving: oracle.jdbc.xa.client.OracleXAResource@6ac7c8 flag=67108864
      2002-04-26 15:53:39,587 TRACE [org.jboss.tm.TxManager] rolled back tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
      2002-04-26 15:53:39,587 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
      2002-04-26 15:53:39,595 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: start
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable is: java.lang.IllegalArgumentException: xaRes not enlisted
      java.lang.IllegalArgumentException: xaRes not enlisted
      at org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:546)
      at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:99)
      at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.delist(XATxConnectionManager.java:284)
      at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.connectionClosed(XATxConnectionManager.java:329)
      at org.jboss.resource.adapter.jdbc.BaseManagedConnection.fireConnectionEvent(BaseManagedConnection.java:152)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.fireConnectionEvent(XAManagedConnection.java:203)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection$1.connectionClosed(XAManagedConnection.java:115)
      at oracle.jdbc.pool.OraclePooledConnection.callListener(OraclePooledConnection.java:272)
      at oracle.jdbc.pool.OraclePooledConnection.logicalClose(OraclePooledConnection.java:246)
      at oracle.jdbc.driver.OracleConnection.logicalClose(OracleConnection.java:2304)
      at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1110)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.safeClose(JDBCUtil.java:58)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:174)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:384)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:794)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:867)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:341)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy15.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:429)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:867)




      And Here is the JBOSS start-up messages related to my OracleXaDS setting in oracle-xa-service.xml:

      2002-04-26 15:53:20,407 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=XaTxCM,name=OracleXaDS
      2002-04-26 15:53:20,407 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.connectionmanager.XATxConnectionManager
      2002-04-26 15:53:20,411 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.jca:service=XaTxCM,name=OracleXaDS
      2002-04-26 15:53:20,411 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=XaTxCM,name=OracleXaDS depends on jboss.jca:service=RARDeployer
      2002-04-26 15:53:20,411 DEBUG [org.jboss.system.ServiceConfigurator] considering with object name jboss.jca:service=RARDeployer
      2002-04-26 15:53:20,417 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,417 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.connectionmanager.RARDeployment
      2002-04-26 15:53:20,422 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,423 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=XaTxDS,name=OracleXaDS depends on jboss.jca:service=RARDeployment,name=Minerva
      JDBC XATransaction ResourceAdapter
      2002-04-26 15:53:20,423 DEBUG [org.jboss.system.ServiceConfigurator] considering OldRarDeployment with object name jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction
      ResourceAdapter
      2002-04-26 15:53:20,424 DEBUG [org.jboss.system.ServiceConfigurator] ManagedConnectionFactoryProperties set to
      <config-property>
      <config-property-name>XADataSourceClass</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>oracle.jdbc.xa.client.OracleXADataSource</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>XADataSourceProperties</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>URL=jdbc:oracle:thin:@localhost:1521:YOSEMITE;user=scott;pasword=tiger</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>TransactionIsolation</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>TRANSACTION_READ_COMMITTED</config-property-value>
      </config-property>
      in jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,545 DEBUG [org.jboss.system.ServiceConfigurator] JndiName set to OracleXaDS in jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,545 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=XaTxCM,name=OracleXaDS depends on jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,546 DEBUG [org.jboss.system.ServiceConfigurator] considering ManagedConnectionFactoryName with object name jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,546 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,546 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.connectionmanager.JBossManagedConnectionPool
      2002-04-26 15:53:20,549 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,550 DEBUG [org.jboss.system.ServiceConfigurator] MinSize set to 0 in jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,550 DEBUG [org.jboss.system.ServiceConfigurator] MaxSize set to 50 in jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,550 DEBUG [org.jboss.system.ServiceConfigurator] BlockingTimeoutMillis set to 5000 in jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,550 DEBUG [org.jboss.system.ServiceConfigurator] IdleTimeoutMinutes set to 15 in jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,666 DEBUG [org.jboss.system.ServiceConfigurator] Criteria set to ByContainer in jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,666 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=XaTxCM,name=OracleXaDS depends on jboss.jca:service=LocalTxPool,name=OracleXaDS2002-04-26 15:53:20,667 DEBUG [org.jboss.system.ServiceConfigurator] considering ManagedConnectionPool with object name jboss.jca:service=LocalTxPool,name=OracleXaDS
      2002-04-26 15:53:20,667 DEBUG [org.jboss.system.ServiceController] recording that jboss.jca:service=XaTxCM,name=OracleXaDS depends on jboss.jca:service=CachedConnectionManager
      2002-04-26 15:53:20,667 DEBUG [org.jboss.system.ServiceConfigurator] considering CachedConnectionManager with object name jboss.jca:service=CachedConnectionManager
      2002-04-26 15:53:20,777 DEBUG [org.jboss.system.ServiceConfigurator] SecurityDomainJndiName set to java:/jaas/OracleXaDbRealm in jboss.jca:service=XaTxCM,name=OracleXaDS
      2002-04-26 15:53:20,891 DEBUG [org.jboss.system.ServiceConfigurator] TransactionManager set to java:/TransactionManager in jboss.jca:service=XaTxCM,name=OracleXaDS
      2002-04-26 15:53:20,892 DEBUG [org.jboss.system.ServiceController] waiting in create jboss.jca:service=XaTxCM,name=OracleXaDS waiting on jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,892 WARN [org.jboss.system.ServiceController] jboss.jca:service=XaTxDS,name=OracleXaDS does not implement any Service methods
      2002-04-26 15:53:20,894 DEBUG [org.jboss.system.ServiceController] waiting in create jboss.jca:service=XaTxDS,name=OracleXaDS waiting on jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter
      2002-04-26 15:53:20,894 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Creating
      2002-04-26 15:53:20,895 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Created
      2002-04-26 15:53:20,896 DEBUG [org.jboss.system.ServiceController] waiting in create jboss.jca:service=XaTxCM,name=OracleXaDS waiting on jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,896 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying oracle-xa-service.xml
      2002-04-26 15:53:20,896 DEBUG [org.jboss.deployment.MainDeployer] start step for deployment file:/home/jchang/jboss/jboss-3.0.0RC1/server/default/deploy/oracle-xa-service.xml
      2002-04-26 15:53:20,896 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, start step: url file:/home/jchang/jboss/jboss-3.0.0RC1/server/default/deploy/oracle-xa-service.xml
      2002-04-26 15:53:20,896 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.jca:service=XaTxCM,name=OracleXaDS on jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,897 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.jca:service=XaTxDS,name=OracleXaDS on jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter
      2002-04-26 15:53:20,897 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Starting
      2002-04-26 15:53:20,898 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Started
      2002-04-26 15:53:20,899 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.jca:service=XaTxCM,name=OracleXaDS on jboss.jca:service=XaTxDS,name=OracleXaDS
      2002-04-26 15:53:20,899 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: oracle-xa-service.xml
      2002-04-26 15:53:20,899 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/home/jchang/jboss/jboss-3.0.0RC1/server/default/deploy/oracle-xa-service.xml
      2002-04-26 15:53:20,900 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/home/jchang/jboss/jboss-3.0.0RC1/server/default/deploy/oracle-xa-service.xml -> file:/home/jchang/jboss/jboss-3.0.0RC1/server/default/deploy/oracle-xa-service.xml


      The property configuration part of my oracle-xa-service.xml file is shown above in the log dump. I can supply the whole file content if needed. Right now I'm not sure why the CMP table cration operation fails (the CMP-generated SQL statements can be run w/o problem), and whether the XA connection is working or not. Any help is appreciated. Thanks,

      --- Jeff

        • 1. Re: Oracle XA data source
          David Jencks Master

          Sure makes me wish (???) I could get Oracle running on my machine...

          I don't see anything wrong yet... the xa wrapper has not been used very much however.

          Would it be possible for you to create the tables by hand using the definitions the cmp engine generates, turn create-tables off, and see what problems occur when you try to use your beans? I can't see why this would make any difference but don't have a better idea yet.


          Well... maybe one. In the log trace, when the first connection is asked for, you should see something from the security system about adding your OracleDSRealm. What does that part look like? Is it finding the user/pw?

          • 2. Re: Oracle XA data source
            Jeffrey Jeffrey Newbie

            Following your suggestion, I did manually create those tables used by Entity Beans, and my EBs are deployed without error.
            But, as soon as I start to access EBs by calling ejbCreate() from home interface, the SQL executed gets rolled back immediately (SELECT keyName FROM MEXSEQUENCE WHERE keyName=?). Here's the error messages from server.log:



            2002-04-27 17:36:08,274 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.0.0RC1 Date:200204150356] Started in 1m:20s:583ms
            2002-04-27 17:36:31,251 TRACE [org.jboss.tm.TxCapsule] Created new instance for tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
            2002-04-27 17:36:31,252 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
            2002-04-27 17:36:31,253 TRACE [org.jboss.tm.TxCapsule] Committing, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=], status=STATUS_ACTIVE
            2002-04-27 17:36:31,254 TRACE [org.jboss.tm.TxCapsule] Before completion done, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=], status=STATUS_ACTIVE
            2002-04-27 17:36:31,254 TRACE [org.jboss.tm.TxCapsule] Zero phase commit: No resources.
            2002-04-27 17:36:31,254 TRACE [org.jboss.tm.TxCapsule] Committed OK, tx=XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
            2002-04-27 17:36:31,255 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//0, BranchQual=]
            2002-04-27 17:36:31,341 TRACE [org.jboss.tm.TxCapsule] Reused instance for tx=XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,341 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,390 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,391 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,444 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,444 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,444 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,445 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,446 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:31,446 TRACE [org.jboss.tm.TxCapsule] Created new instance for tx=XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=]
            2002-04-27 17:36:31,446 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=]
            2002-04-27 17:36:31,460 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=]
            2002-04-27 17:36:31,460 TRACE [org.jboss.tm.TxCapsule] Created new instance for tx=XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=]
            2002-04-27 17:36:31,460 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=]
            2002-04-27 17:36:31,511 TRACE [org.jboss.tm.TxCapsule] enlistResource(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=] status=STATUS_ACTIVE
            2002-04-27 17:36:31,512 TRACE [org.jboss.tm.TxCapsule] startResource(OracleXid [FormatId=257, GlobalId=tiger//3, BranchQual=1]) entered: oracle.jdbc.xa.client.OracleXAResource@f8ee4 flags=0
            2002-04-27 17:36:32,180 TRACE [org.jboss.tm.TxCapsule] startResource(OracleXid [FormatId=257, GlobalId=tiger//3, BranchQual=1]) leaving: oracle.jdbc.xa.client.OracleXAResource@f8ee4 flags=0
            2002-04-27 17:36:32,185 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Sequence.findByPrimaryKey] Executing SQL: SELECT keyName FROM MEXSEQUENCE
            WHERE keyName=?
            2002-04-27 17:36:32,187 TRACE [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Sequence.findByPrimaryKey] Set parameter: index=1, jdbcType=VARCHAR, value=Account
            2002-04-27 17:36:32,235 TRACE [org.jboss.tm.TxCapsule] delistResource(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=] status=STATUS_ACTIVE
            2002-04-27 17:36:32,237 TRACE [org.jboss.tm.TxCapsule] setRollbackOnly(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=] status=STATUS_ACTIVE
            2002-04-27 17:36:32,238 TRACE [org.jboss.tm.TxCapsule] rollback(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=] status=STATUS_MARKED_ROLLBACK
            2002-04-27 17:36:32,238 TRACE [org.jboss.tm.TxCapsule] endresources(0): state=1
            2002-04-27 17:36:32,238 TRACE [org.jboss.tm.TxCapsule] endResource(OracleXid [FormatId=257, GlobalId=tiger//3, BranchQual=1]) entered: oracle.jdbc.xa.client.OracleXAResource@f8ee4 flag=67108864
            2002-04-27 17:36:32,309 TRACE [org.jboss.tm.TxCapsule] endResource(OracleXid [FormatId=257, GlobalId=tiger//3, BranchQual=1]) leaving: oracle.jdbc.xa.client.OracleXAResource@f8ee4 flag=67108864
            2002-04-27 17:36:32,345 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//3, BranchQual=]
            2002-04-27 17:36:32,345 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=]
            2002-04-27 17:36:32,346 TRACE [org.jboss.tm.TxCapsule] setRollbackOnly(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=] status=STATUS_ACTIVE
            2002-04-27 17:36:32,347 TRACE [org.jboss.tm.TxCapsule] rollback(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=] status=STATUS_MARKED_ROLLBACK
            2002-04-27 17:36:32,347 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//2, BranchQual=]
            2002-04-27 17:36:32,347 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:32,348 TRACE [org.jboss.tm.TxCapsule] setRollbackOnly(): Entered, tx=XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=] status=STATUS_ACTIVE
            2002-04-27 17:36:32,349 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:32,349 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=tiger//1, BranchQual=]
            2002-04-27 17:36:32,357 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
            java.rmi.ServerException: null
            Embedded Exception
            null; nested exception is:
            javax.ejb.EJBException: null
            Embedded Exception
            null
            javax.ejb.EJBException: null
            Embedded Exception
            null
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:242)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:706)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
            at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
            at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)

            at $Proxy35.getNextNumberInSequence(Unknown Source)
            at org.mex.ejb.AccountBean.ejbCreate(AccountBean.java:126)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:221)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:231)
            at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1111)
            at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
            at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:230)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:176)
            at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
            at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
            at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
            at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
            at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
            at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:251)
            at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$HomeProxy.invoke(BaseLocalContainerInvoker.java:375)
            ....



            I still could not see where the root cause is that cause TxCapsule.delistResource() to be called and Tx rollbacked. Is there any way to dig further for error info either on the JBOSS CMP side or through Oracle DB server log?


            Regarding security system, I have both XA and non-XA Oracle Data Source configurated (OracleXaDS and OracleDS). My EBs with CMP20 can be run without error through OracleDS; I compared the output related to OracleXaDbRealm and OracleDbRealm and found no differenct. Here's the related output log for OracleXaDbRealm:


            2002-04-27 17:35:43,211 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Starting
            2002-04-27 17:35:43,226 TRACE [org.jboss.tm.TransactionManagerService] Constructing
            2002-04-27 17:35:43,229 INFO [org.jboss.security.plugins.JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@bcf
            2002-04-27 17:35:43,232 INFO [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@754fc
            2002-04-27 17:35:43,234 DEBUG [org.jboss.security.plugins.JaasSecurityManager.OracleXaDbRealm] CachePolicy set to: org.jboss.util.TimedCachePolicy@754fc
            2002-04-27 17:35:43,234 INFO [org.jboss.security.plugins.JaasSecurityManagerService] Added OracleXaDbRealm, org.jboss.security.plugins.SecurityDomainContext@5c998a to map
            2002-04-27 17:35:43,417 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] set property XADataSourceClass to value oracle.jdbc.xa.client.OracleXADataSource
            2002-04-27 17:35:43,550 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] set property XADataSourceProperties to value URL=jdbc:oracle:thin:@localhost:1521:YOSEMITE;user=scott;pasword=tiger
            2002-04-27 17:35:43,677 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] set property TransactionIsolation to value TRANSACTION_READ_COMMITTED
            2002-04-27 17:35:43,677 DEBUG [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.OracleXaDS] Binding object 'org.jboss.resource.adapter.jdbc.JDBCDataSource@474e45' into JNDI at 'java:/OracleXaDS'
            2002-04-27 17:35:43,678 INFO [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.OracleXaDS] Bound connection factory for resource adapter 'Minerva JDBC XATransaction ResourceAdapter' to JNDI name 'java:/OracleXaDS'
            2002-04-27 17:35:43,680 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Started


            I didn't find log messages related to security system when the first SQL connection is asked for, though. Does the log looks normal for OracleXaDbRealm?

            Thanks for help,

            --- Jeff

            • 3. Re: Oracle XA data source
              David Jencks Master

              Just to check, have you set up the tx manager to use Oracle Xids? I assume you have since Oraclexid shows up in a couple of log messages -- but I don't have any more ideas.

              I'm not all that happy with the level of logging -- it often seems as if useless info is repeated many hundreds of times but what you want to know is left out. If you can dig through the stack trace and find where the interesting error is coming from and log it or perhaps better propagate the message upwards... that would be good.

              • 4. Re: Oracle XA data source
                Georg Schmid Newbie

                I am currently fighting with the Oracle XA setup.
                So I looked at the stack trace above.

                Is it actually possible to use the local tx pool
                with an XA datasource?

                Regards
                Georg

                • 5. Re: Oracle XA data source
                  David Jencks Master

                  You have sharp eyes. Actually the object names generally just follow a naming convention. The ConnectionManager is the only part that needs to be xa-specific, an XATxConnectionManager: the RARDeployment and ManagedConnectionPool are generic. So, he has the correct XATxConnectionManager, appropriately named, but the pool is misleadingly named "local".

                  When you get it to work, I'd sure like the config.

                  I forgot to notice, are you using the oracle xid implementation in the tx manager?

                  Thanks
                  david jencks

                  • 6. Re: Oracle XA data source
                    Georg Schmid Newbie

                    Thanks for the reply.

                    I added a new, XA-based connection setup for my Oracle DB
                    (to avoid this "you won't get the semantics..." message,
                    and, yeah, get the correct the semantics :-)).

                    This resulted in a very obscure Oracle error message
                    that has already been posted elsewhere:
                    PL/SQL complains about some undefined symbols, like
                    JAVA_XA.XA_START_NEW (or similar).

                    After two hours I found, in some Oracle JDBC 2.0 docs,
                    that, when using XA, an Oracle package name JAVA_XA
                    has to be installed on the servers.

                    Now my problem seems to be as follows:
                    Our Oracle production servers must run 365x24x7, only two
                    times a year a maintenance downtime is scheduled (this
                    is a manufacturing app). I don't have time to wait 6
                    months for the DBA to install the package, so I need
                    a non-XA-setup, that allows me to take data from a
                    durable topic by using an MDB.

                    I read through the JMS- and MDB-related online docs,
                    and I got the impression, that this will require
                    a lot of configuration. And I am not sure whether it
                    will work at all.

                    Can you give me some hints, how and where to start
                    (replacing everything in the default setup starting with DefaultJMSProvider ? Or is there a more effortless way?)

                    TIA.

                    Georg


                    • 7. Re: Oracle XA data source
                      David Jencks Master

                      I don't understand the problem, but I don't have much experience with mdbs; judging by the testsuite they don't seem very hard to set up. I think however that normally any mdb gets messages from whatever it is connected to in a transaction, and continues its work (for instance writing to a db) in the same transaction. The jboss mq stuff is xa (at least nominally, although I don't think it implements any recovery methods). If you use a local tx (non xa) driver to Oracle transactions will work fine except in the case that something crashes in the middle of the commit step, in which case the state and outcome of the transaction will be unrecoverable. If you have Oracle up for 6 months, it crashing is presumably not something you have to worry about.

                      • 8. Re: Oracle XA data source
                        Georg Schmid Newbie


                        So this means I can ignore the "You don't get the semantics you expect warning" if I'm aware that there
                        will be no recovery in case of a failed commit, correct?

                        Georg