3 Replies Latest reply on Sep 13, 2007 1:36 PM by Mark Little

    RollbackException while starting JMS MBeans with SQLServer20

    Martin Steinle Newbie

      Hello,

      I tried to migrate my application running on JBoss 4.0.3sp1 with JbossTS 4.2.3sp5 from Oracle database to SQLServer2005. Doing that, I wanted JMS to use SQLServer, too. I configured SQLServer to allow XA transactions using the xa_install.sql script and sqljdbc_xa.dll, configured MSDTC to allow XA transactions and granted my user the SqlJDBCXAUser role (as described by microsoft).
      Of course, I updated the JMS configuration and standardjaws.xml for SQLServer.
      When starting JBoss, the JMS tables are created.
      But, when the JMS MBeans are created, there is the following exception:

      10:39:29,818 WARN [ServiceController] Problem starting service jboss.mq:service=StateManager
      org.jboss.mq.SpyJMSException: Could not commit/rollback a transaction with the transaction manager.; - nested throwable: (javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state)
       at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:635)
       at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:488)
       at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:399)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:428)
       at org.jboss.system.ServiceController.start(ServiceController.java:446)
       at org.jboss.system.ServiceController.start(ServiceController.java:446)
       at org.jboss.system.ServiceController.start(ServiceController.java:446)
      [...]
      Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhe
      naborted] Can't commit because the transaction is in aborted state
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1394)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:630)
       ... 112 more
      


      The datasource I'm using looks the following
      <datasources>
       <xa-datasource>
       <jndi-name>DefaultDS</jndi-name>
       <track-connection-by-tx/>
       <isSameRM-override-value>false</isSameRM-override-value>
       <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
       <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
       <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
       <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
       <user-name>user</user-name>
       <password>password</password>
       <metadata>
       <type-mapping>MS SQLSERVER2000</type-mapping>
       </metadata>
       </xa-datasource>
      </datasources>

      Can anyone tell me what that exception indicates?
      Besides, using a local-tx-datasource, the exception looks exactly the same.

      Regards,
      Martin