11 Replies Latest reply on Dec 15, 2007 12:37 PM by vickyk

    MSSQL XA datasource throws RollbackException on cluster star

    ratrask

      I am trying to get the Microsoft 1.2 JDBC driver configured for xa-datasource to function as the DefaultDS for an 4.2.1.GA jboss cluster, and I have run into an issue that I hope you can help with.

      On the second and all subsequent attempts at starting the server I get a javax.transaction.RollbackException. I have done no other processing, I just shut it down and start it back up. If I drop all of the tables that JBoss creates, and start the server there are no errors reported.

      I have followed the directions to turn on trace for jdbc and ta, but I see no difference in the output.

      First let me document the setup which I have pieced together from multiple sources. I think this is getting close. It may contain steps that are not required, but I know this is close to working.

      Host is: Microsoft Windows Server 2003
      Standard Edition
      Service Pack 2

      Intel Xeon 2.80GHz
      1.00 GB of Ram



      1.) I installed SQL Server 2005 evaluation
      2.) Downloaded and expanded the 1.2 driver package released 10/15/2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en
      3.) Copied the appropriate dll to the Binn directory soc SQL Server as documented in the comments of the sqljdbc_1.2\enu\xa\xa_install.sql file from the directory where I expanded the JDBC package.
      4.) Ran the T-SQL script in the xa directory of the JDBC driver.
      5.) Turned on the MS DTC service http://www-1.ibm.com/support/docview.wss?uid=swg21221370
      6.) Created a boss user -- Make sure to turn enable SQL login, and uncheck the box that says enforce the log in policy.
      7.) Created a jboss database, and made my jboss user the owner of it.
      8.) Modified the jboss user to have access to the master and granted the SqlJDBCXAUser, then made the jboss database the default database.
      9.) Restarted SQL Server.
      10.) Copied the jdbc driver to server/all/lib
      11.) Deleted the hsqldb-ds.xml file
      12.) Copied the docs/examples/jca/mssql-da-ds.xml file to the deploy directory. It required some major surgery to get right. I eventually wound up with this:
      <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">jboss</xa-datasource-property>
       <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
       <xa-datasource-property name="User">jboss</xa-datasource-property>
       <xa-datasource-property name="Password">jboss</xa-datasource-property>
       <xa-datasource-property name="URL">jdbc:sqlserver://localhost:1433</xa-datasource-property>
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
       <metadata>
       <type-mapping>MS SQLSERVER2000</type-mapping>
       </metadata>
       </xa-datasource>
      </datasources>

      13.) In the deploy-hasingleton directory I deleted the hsqldb-jdbc-state-service.xml file
      14.) Copied the docs\examples\jms\mssql-jdbc2-service.xml
      15.) Changed the datasource in mssql-jdbc2-service.xml to DefaultDS


      This being my first attempt ( Yea right :) ) it of course came up with no errors.

      The problem is that on all subsequent times that it comes up I get the following exception being thrown.

      19:50:39,919 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      19:50:41,950 WARN [JDBCStateManager] Error initialising state manager db
      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:638)
       at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:485)
       at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:393)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
      
      
      ~~~~~~~~~~~~~~ more stuff you probably don't care about ~~~~~~~~
      
      
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
       at org.jboss.Main.boot(Main.java:200)
       at org.jboss.Main$1.run(Main.java:508)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: 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 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:633)
       ... 112 more
      19:50:42,294 INFO [A] Bound to JNDI name: queue/A
      19:50:42,325 INFO [B] Bound to JNDI name: queue/B
      



      I am stumped and I have not been able to come up with any meaningful clues on the Web.

      Thanks in advance for any help.

      Ronald Trask

      Professional Services
      XAware inc.

      http://www.xaware.org


        • 1. Re: MSSQL XA datasource throws RollbackException on cluster
          ratrask

          One thing that you have to be careful of, SQL Server will frequently change the port that it listens on to some other number (that's Microsoft for ya) if you get a connection refused on startup check and see what port it is actually listening on.

          This happened to me when I tried to configure it on my XP based laptop. I don't think it happens on 2003.

          I have not been successful at getting it to run on a XP workstation, but I think that is because the DTS is not running.

          I'll try that later and let you know what happens.

          • 2. Re: MSSQL XA datasource throws RollbackException on cluster
            ratrask

            you can find out what port it is listening on by going to the Configuration manager and following the links for Protocolse for MSSQLSERVER->TCP/IP Properties and clicking on the IP Address tab.

            Ronald Trask
            XAware inc
            Professional Services.

            • 3. Re: MSSQL XA datasource throws RollbackException on cluster
              vickyk

               

              at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:638)

              The error appears to come from here , enable the TRACE logging on
              org.jboss.mq.sm.jdbc.JDBCStateManager class and trace the flow .
              Also make sure that datasource configuration is working , you can write a simple jsp to test that .
              First let us make sure that the datasource is configured properly.

              One thing that you have to be careful of, SQL Server will frequently change the port that it listens on to some other number (that's Microsoft for ya) if you get a connection refused on startup check and see what port it is actually listening on.

              Do you mean to say that every time you restart the MSSQL server it listens on different ports? There should be some way to configure the fixed port , I wanted to try this but I have fedora installed on my laptop .

              Ronald , I don't believe that the MS doesn't provide a way to configure the fixed port to listen :) , google to know more configuration !!!

              • 4. Re: MSSQL XA datasource throws RollbackException on cluster
                ratrask

                Last things first:

                Do you mean to say that every time you restart the MSSQL server it listens on different ports? There should be some way to configure the fixed port , I wanted to try this but I have fedora installed on my laptop .

                Ronald , I don't believe that the MS doesn't provide a way to configure the fixed port to listen :) , google to know more configuration


                No that is not what I mean to say. The default port the SQL Server listens on is 1433. But it must have an algorithm for picking a different port if it discovers that that port is in use, because on my laptop it came up on port 1961. This caused me some delay in trackinig down what happened, because there was no indication that it had changed from 1433 other than a connection refused message. After Googling around I bit I found a hint that I needed to check at the place I described in the post to find out what port it was listening on.

                You can also set the port that it listens on at the same location. I have not researched it enough to know why / when it changes, but I suspect it only occurs the first time that the TCP/IP connectivity is enabled.

                Sorry for any confusion that this may have caused. My intent was good. I was just trying to help anyone who was following in my tracks.

                Now to the real point of the post. Perhaps I am doing this wrong, but I have not seen any difference after enabeling trace The same information goes to the console, and there is no error displayed in the server log, or any indicative information in the server.log

                This is how I am enabeling trace.
                In the conf directory of my server, I edit the file jboss-log4j.xml. i.e. (jboss-4.2.1.GA/server/fast2market/conf/jboss-log4j.xml

                I add the following:

                <category name="org.jboss.tm">
                 <priority value="TRACE" class="org.jboss.logging.XLevel"/>
                 </category>
                 <category name="org.jboss.jdbc">
                 <priority value="TRACE" class="org.jboss.logging.XLevel"/>
                 </category>
                 <category name="org.jboss.mq.sm.jdbc.JDBCStateManar">
                 <priority value="TRACE" class="org.jboss.logging.XLevel"/>
                 </category>


                Is there something that I am doing wrong?

                This is the information in the service.log:
                2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying jbossmq-httpil.sar
                2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml
                2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml
                2007-11-30 10:35:00,778 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.mq:service=StateManager with code: org.jboss.mq.sm.jdbc.JDBCStateManager
                2007-11-30 10:35:00,841 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.mq:service=StateManager
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] recording that jboss.mq:service=StateManager depends on jboss.jca:service=DataSourceBinding,name=DefaultDS
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceConfigurator] considering ConnectionManager with object name jboss.jca:service=DataSourceBinding,name=DefaultDS
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceConfigurator] SqlProperties set to CREATE_TABLES_ON_STARTUP = TRUE
                 CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
                 CLIENTID VARCHAR(128) NULL, PRIMARY KEY(USERID))
                 CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
                 PRIMARY KEY(USERID, ROLEID))
                 CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
                 SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
                 SELECTOR VARCHAR(255) NULL, PRIMARY KEY(CLIENTID, SUBNAME))
                 GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                 LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                 GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
                 INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
                 UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
                 REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                 GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
                 GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
                 POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
                 POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
                 POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
                 POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
                 POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
                 POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
                 POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
                 POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
                 POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
                 POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
                 POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
                 POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
                 POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
                 POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody') in jboss.mq:service=StateManager
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] Creating service jboss.mq:service=StateManager
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] waiting in create of jboss.mq:service=StateManager waiting on jboss.jca:service=DataSourceBinding,name=DefaultDS
                2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying hsqldb-jdbc-state-service.xml
                2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/jbossmq-destinations-service.xml
                2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/jbossmq-destinations-service.xml
                2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.mq.destination:service=Topic,name=testTopic with code: org.jboss.mq.server.jmx.Topic
                2007-11-30 10:35:00,903 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.mq.destination:service=Topic,name=testTopic



                Here is the console output for the same run:

                10:35:19,888 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                10:35:20,138 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                10:35:22,513 WARN [JDBCStateManager] Error initialising state manager db
                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:638)
                 at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:485)
                 at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:393)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                 at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)


                There is no relevant entry in the boot.log. except that it is picking up the jboss-log4j.xml configuration.

                10:34:36,372 DEBUG [ServiceController] Creating service jboss.system:type=Log4jService,service=Logging
                10:34:36,372 DEBUG [Log4jService] Creating jboss.system:type=Log4jService,service=Logging
                10:34:36,388 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
                



                • 5. Re: MSSQL XA datasource throws RollbackException on cluster
                  ratrask

                  I realized after I submitted the post, that I did not have the portion of the server.log that overlaps the time when the exception is logged.

                  2007-11-30 10:35:20,138 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Started jboss.jca:service=DataSourceBinding,name=DefaultDS
                  2007-11-30 10:35:20,138 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.jca:service=DataSourceBinding,name=DefaultDS dependent components: [ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
                   State: CREATED
                   I Depend On:
                   jboss.jca:service=DataSourceBinding,name=DefaultDS
                  , ObjectName: jboss:service=juddi
                   State: CREATED
                   I Depend On:
                   jboss.jca:service=DataSourceBinding,name=DefaultDS
                  , ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
                   State: CREATED
                   I Depend On:
                   jboss:service=TransactionManager
                   jboss.jca:service=DataSourceBinding,name=DefaultDS
                  , ObjectName: jboss.mq:service=StateManager
                   State: CREATED
                   I Depend On:
                   jboss.jca:service=DataSourceBinding,name=DefaultDS
                   Depends On Me:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq:service=PersistenceManager
                   State: CREATED
                   I Depend On:
                   jboss.jca:service=DataSourceBinding,name=DefaultDS
                   Depends On Me:
                   jboss.mq:service=DestinationManager
                  ]
                  2007-11-30 10:35:20,138 DEBUG [org.jboss.system.ServiceController] starting service jboss.ejb:service=EJBTimerService,persistencePolicy=database
                  2007-11-30 10:35:20,138 DEBUG [org.jboss.ejb.txtimer.DatabasePersistencePolicy] Starting jboss.ejb:service=EJBTimerService,persistencePolicy=database
                  2007-11-30 10:35:20,185 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
                  2007-11-30 10:35:20,185 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1196444570185, new next: 1196444570185
                  2007-11-30 10:35:22,169 DEBUG [org.jboss.ejb.txtimer.DatabasePersistencePolicy] Started jboss.ejb:service=EJBTimerService,persistencePolicy=database
                  2007-11-30 10:35:22,169 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.ejb:service=EJBTimerService,persistencePolicy=database dependent components: []
                  2007-11-30 10:35:22,169 DEBUG [org.jboss.system.ServiceController] starting service jboss:service=juddi
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.jaxr.juddi.JUDDIService] Starting jboss:service=juddi
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.jaxr.juddi.JUDDIService] JUDDIService: Inside startService with dropOnStart=false createOnStart=false
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.jaxr.juddi.JUDDIService] Started jboss:service=juddi
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss:service=juddi dependent components: []
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.system.ServiceController] starting service jboss:service=KeyGeneratorFactory,type=HiLo
                  2007-11-30 10:35:22,185 DEBUG [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Starting jboss:service=KeyGeneratorFactory,type=HiLo
                  2007-11-30 10:35:22,200 TRACE [org.jboss.tm.TransactionManagerLocator] Got a transaction manager from jndi com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@107f8ba
                  2007-11-30 10:35:22,200 DEBUG [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Executing SQL: select HIGHVALUES from HILOSEQUENCES where SEQUENCENAME='general'
                  2007-11-30 10:35:22,356 DEBUG [org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory] Started jboss:service=KeyGeneratorFactory,type=HiLo
                  2007-11-30 10:35:22,356 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss:service=KeyGeneratorFactory,type=HiLo dependent components: []
                  2007-11-30 10:35:22,356 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq:service=StateManager
                  2007-11-30 10:35:22,356 DEBUG [org.jboss.mq.sm.jdbc.JDBCStateManager] Starting jboss.mq:service=StateManager
                  2007-11-30 10:35:22,513 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
                  2007-11-30 10:35:22,513 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
                  2007-11-30 10:35:22,513 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
                  2007-11-30 10:35:22,513 WARN [org.jboss.mq.sm.jdbc.JDBCStateManager] Error initialising state manager db
                  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:638)
                   at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:485)
                   at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:393)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy51.start(Unknown Source)
                   at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor23.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy5.deploy(Unknown Source)
                   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                   at org.jboss.Main.boot(Main.java:200)
                   at org.jboss.Main$1.run(Main.java:508)
                   at java.lang.Thread.run(Thread.java:595)
                  Caused by: 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 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:633)
                   ... 112 more
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.mq.sm.jdbc.JDBCStateManager] Started jboss.mq:service=StateManager
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.mq:service=StateManager dependent components: [ObjectName: jboss.mq:service=DestinationManager
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=MessageCache
                   jboss.mq:service=PersistenceManager
                   jboss.mq:service=StateManager
                   Depends On Me:
                   jboss.mq.destination:service=Topic,name=testTopic
                   jboss.mq.destination:service=Topic,name=securedTopic
                   jboss.mq.destination:service=Topic,name=testDurableTopic
                   jboss.mq.destination:service=Queue,name=testQueue
                   jboss.mq.destination:service=Queue,name=A
                   jboss.mq.destination:service=Queue,name=B
                   jboss.mq.destination:service=Queue,name=C
                   jboss.mq.destination:service=Queue,name=D
                   jboss.mq.destination:service=Queue,name=ex
                   jboss.mq:service=SecurityManager
                   jboss.mq.destination:service=Queue,name=DLQ
                  ]
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq:service=DestinationManager
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.mq:service=DestinationManager on jboss.mq:service=PersistenceManager
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq:service=PersistenceManager
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Starting jboss.mq:service=PersistenceManager
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Creating Schema
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Could not create table with SQL: CREATE TABLE JMS_MESSAGES (MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(150) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB IMAGE)
                  com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'JMS_MESSAGES' in the database.
                   at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
                   at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.innerCreateSchema(MSSQLPersistenceManager.java:109)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.createSchema(MSSQLPersistenceManager.java:63)
                   at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1796)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.startService(MSSQLPersistenceManager.java:230)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy51.start(Unknown Source)
                   at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor23.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy5.deploy(Unknown Source)
                   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                   at org.jboss.Main.boot(Main.java:200)
                   at org.jboss.Main$1.run(Main.java:508)
                   at java.lang.Thread.run(Thread.java:595)
                  2007-11-30 10:35:22,528 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Could not create table with SQL: CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
                  com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'JMS_TRANSACTIONS' in the database.
                   at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
                   at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
                   at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.innerCreateSchema(MSSQLPersistenceManager.java:203)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.createSchema(MSSQLPersistenceManager.java:63)
                   at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1796)
                   at org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager.startService(MSSQLPersistenceManager.java:230)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at org.jboss.system.ServiceController.start(ServiceController.java:435)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy51.start(Unknown Source)
                   at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor23.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor9.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:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                   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:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy5.deploy(Unknown Source)
                   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                   at org.jboss.Main.boot(Main.java:200)
                   at org.jboss.Main$1.run(Main.java:508)
                   at java.lang.Thread.run(Thread.java:595)
                  2007-11-30 10:35:22,560 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Resolving uncommited TXS
                  2007-11-30 10:35:22,622 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Started jboss.mq:service=PersistenceManager
                  2007-11-30 10:35:22,622 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.mq:service=PersistenceManager dependent components: [ObjectName: jboss.mq:service=DestinationManager
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=MessageCache
                   jboss.mq:service=PersistenceManager
                   jboss.mq:service=StateManager
                   Depends On Me:
                   jboss.mq.destination:service=Topic,name=testTopic
                   jboss.mq.destination:service=Topic,name=securedTopic
                   jboss.mq.destination:service=Topic,name=testDurableTopic
                   jboss.mq.destination:service=Queue,name=testQueue
                   jboss.mq.destination:service=Queue,name=A
                   jboss.mq.destination:service=Queue,name=B
                   jboss.mq.destination:service=Queue,name=C
                   jboss.mq.destination:service=Queue,name=D
                   jboss.mq.destination:service=Queue,name=ex
                   jboss.mq:service=SecurityManager
                   jboss.mq.destination:service=Queue,name=DLQ
                  ]
                  2007-11-30 10:35:22,622 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq:service=DestinationManager
                  2007-11-30 10:35:22,622 DEBUG [org.jboss.mq.server.jmx.DestinationManager] Starting jboss.mq:service=DestinationManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.mq.server.jmx.DestinationManager] Started jboss.mq:service=DestinationManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.mq:service=DestinationManager dependent components: [ObjectName: jboss.mq.destination:service=Topic,name=testTopic
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   jboss.mq:service=SecurityManager
                  , ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   jboss.mq:service=SecurityManager
                  , ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   jboss.mq:service=SecurityManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   jboss.mq:service=SecurityManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=A
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=B
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=C
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=D
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq.destination:service=Queue,name=ex
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                  , ObjectName: jboss.mq:service=SecurityManager
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   Depends On Me:
                   jboss.mq.destination:service=Topic,name=testTopic
                   jboss.mq.destination:service=Topic,name=securedTopic
                   jboss.mq.destination:service=Topic,name=testDurableTopic
                   jboss.mq.destination:service=Queue,name=testQueue
                   jboss.mq:service=TracingInterceptor
                   jboss.mq.destination:service=Queue,name=DLQ
                  , ObjectName: jboss.mq.destination:service=Queue,name=DLQ
                   State: CREATED
                   I Depend On:
                   jboss.mq:service=DestinationManager
                   jboss.mq:service=SecurityManager
                  ]
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq.destination:service=Topic,name=testTopic
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.mq.destination:service=Topic,name=testTopic on jboss.mq:service=SecurityManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq.destination:service=Topic,name=securedTopic
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.mq.destination:service=Topic,name=securedTopic on jboss.mq:service=SecurityManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq.destination:service=Topic,name=testDurableTopic
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.mq.destination:service=Topic,name=testDurableTopic on jboss.mq:service=SecurityManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq.destination:service=Queue,name=testQueue
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.mq.destination:service=Queue,name=testQueue on jboss.mq:service=SecurityManager
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.system.ServiceController] starting service jboss.mq.destination:service=Queue,name=A
                  2007-11-30 10:35:22,638 DEBUG [org.jboss.mq.server.jmx.Queue.A] Starting jboss.mq.destination:service=Queue,name=A
                  2007-11-30 10:35:22,653 DEBUG [org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager] Restored 0 message(s) to: QUEUE.A 0 need recovery.
                  2007-11-30 10:35:22,669 INFO [org.jboss.mq.server.jmx.Queue.A] Bound to JNDI name: queue/A
                  2007-11-30 10:35:22,669 DEBUG [org.jboss.mq.server.jmx.Queue.A] Started jboss.mq.destination:service=Queue,name=A


                  • 6. Re: MSSQL XA datasource throws RollbackException on cluster
                    vickyk

                     

                    Could not create table
                    with SQL: CREATE TABLE JMS_MESSAGES (MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(150) NOT NULL,
                    TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB IMAGE)
                    com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named 'JMS_MESSAGES' in
                    the database.

                    Looks like the table has already been created earlier , can you check this form the Jboss messaging forums ?
                    BTW , you can delete the tables manually from the MSSQL and then try restarting the Jboss ... that might work .

                    Is there something that I am doing wrong?

                    You should understand that with Jboss4.2 version the older TM has been replaced with new Arjuna TM that supports RecoveryManager feature which was missing in earlier old TM .
                    So TM related logging should be done on com.arjuna.ats.internal.jta .

                    Ronald , why don't you test a simple jsp and get it verified first that datasource is configured properly , the DS seems to be configured properly .
                    I don't see the issue here with Jboss JCA , the configurations seems to be ok ... let us get it verified from the test jsp .
                    Alternatively you can use in the ds configuration and see from the logs if it doesn't show errors .





                    • 7. Re: MSSQL XA datasource throws RollbackException on cluster
                      vickyk

                       

                      2007-11-30 10:35:22,513 WARN [org.jboss.mq.sm.jdbc.JDBCStateManager] Error initialising state manag
                      er db

                      The log contain the DEBUG/WARN messages and not the the ERROR one so these might be ignored :)


                      • 8. Re: MSSQL XA datasource throws RollbackException on cluster
                        ratrask

                        If I delete the table it will recreate it without an error, but the next time that it starts up it will throw the same exception again. The point of a persistant queue is tjhat the state is stored in it. :)

                        So I guess the question now is more a matter of what is the state of the system has it recovered from this error?

                        - 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)


                        When it talks about a transaction here, is it MSSQL transaction, or the XA monitor that JBoss is maintaining, or are they the same thing?

                        Rather than write a test.jsp I have some code that I can exercise the datasource with. Is there anything in particular that I should be testing?

                        • 9. Re: MSSQL XA datasource throws RollbackException on cluster
                          jaikiran

                           

                          If I delete the table it will recreate it without an error, but the next time that it starts up it will throw the same exception again.


                          Once the tables are created for the first time, how about changing the CREATE_TABLES_ON_STARTUP attribute in xxx-jdbc-state-service.xml and xxx-jdbc2-service.xml (both files present in %JBOSS_HOME%/server/< serverName>/deploy/jms folder) to false :

                          CREATE_TABLES_ON_STARTUP = FALSE




                          • 10. Re: MSSQL XA datasource throws RollbackException on cluster
                            ratrask

                            I tried setting

                            CREATE_TABLES_ON_STARTUP = FALSE
                            that did not seem to have any impact.

                            I was concerned about the error, because it was evident that it stopped processing the initialization at the point of the error, because there were other errors that would have been reported had it continued. i.e. there were other tables that were already created which would have caused identical errors that were not being reported.

                            So I did a bit of work and changed the SQL in mssql-jdbc2-service.xml config file. hsqldb-jdbc-state-service.xml also contained code which generated the errors, so I made a copy and renamed it to mssql-jdbc-state-service.xml

                            The changes that I made are as follows:

                            mssql-jdbc2-service.xml
                            <?xml version="1.0" encoding="UTF-8"?>
                            
                            <!-- $Id: mssql-jdbc2-service.xml 63369 2007-06-05 22:22:14Z dbhole $ -->
                            
                            <server>
                            
                             <!-- ==================================================================== -->
                             <!-- Persistence and caching using MSSQL -->
                             <!-- IMPORTANT: Remove hsqldb-jdbc2-service.xml -->
                             <!-- Provided by matty@mattygiedt.com -->
                             <!-- ==================================================================== -->
                            
                             <!--
                             | The destination manager is the core service within JBossMQ
                             -->
                             <mbean code="org.jboss.mq.server.jmx.DestinationManager" name="jboss.mq:service=DestinationManager">
                             <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache</depends>
                             <depends optional-attribute-name="PersistenceManager">jboss.mq:service=PersistenceManager</depends>
                             <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager</depends>
                             </mbean>
                            
                             <!--
                             | The MessageCache decides where to put JBossMQ message that
                             | are sitting around waiting to be consumed by a client.
                             |
                             | The memory marks are in Megabytes. Once the JVM memory usage hits
                             | the high memory mark, the old messages in the cache will start getting
                             | stored in the DataDirectory. As memory usage gets closer to the
                             | Max memory mark, the amount of message kept in the memory cache aproaches 0.
                             -->
                             <mbean code="org.jboss.mq.server.MessageCache"
                             name="jboss.mq:service=MessageCache">
                             <attribute name="HighMemoryMark">50</attribute>
                             <attribute name="MaxMemoryMark">60</attribute>
                             <attribute name="CacheStore">jboss.mq:service=PersistenceManager</attribute>
                             </mbean>
                            
                             <!-- The PersistenceManager is used to store messages to disk. -->
                             <!--
                             | The jdbc2 PersistenceManager is the new improved JDBC implementation.
                             | This implementation allows you to control how messages are stored in
                             | the database.
                             |
                             | This jdbc2 PM configuration has been tested against MS SQL Server 2000
                             |
                             -->
                             <mbean code="org.jboss.mq.pm.jdbc2.MSSQLPersistenceManager"
                             name="jboss.mq:service=PersistenceManager">
                             <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
                             <attribute name="SqlProperties">
                             BLOB_TYPE=BINARYSTREAM_BLOB
                             INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
                             INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
                             SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
                             SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
                             DELETE_ALL_TX = DELETE FROM JMS_TRANSACTIONS
                             SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
                             SELECT_MESSAGE_KEYS_IN_DEST = SELECT MESSAGEID FROM JMS_MESSAGES WHERE DESTINATION=?
                             SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                             MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
                             UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
                             UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
                             UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
                             DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID IN (SELECT TXID FROM JMS_TRANSACTIONS) AND TXOP=?
                             DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
                             DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
                             DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'
                             DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                             CREATE_MESSAGE_TABLE = IF OBJECT_ID (N'dbo.JMS_MESSAGES', N'U') IS NULL CREATE TABLE JMS_MESSAGES (MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(150) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB IMAGE)
                             CREATE_IDX_MESSAGE_TXOP_TXID = IF dbo.CHECK_FOR_INDEX('dbo.JMS_MESSAGES','JMS_MESSAGES_TXOP_TXID') = 0 CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)
                             CREATE_IDX_MESSAGE_DESTINATION = IF dbo.CHECK_FOR_INDEX('dbo.JMS_MESSAGES','JMS_MESSAGES_DESTINATION') = 0 CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)
                             CREATE_IDX_MESSAGE_MESSAGEID_DESTINATION = IF dbo.CHECK_FOR_INDEX('dbo.JMS_MESSAGES','JMS_MESSAGES_IDX') = 0 CREATE UNIQUE CLUSTERED INDEX JMS_MESSAGES_IDX ON JMS_MESSAGES (MESSAGEID, DESTINATION)
                             CREATE_TX_TABLE = IF OBJECT_ID (N'dbo.JMS_TRANSACTIONS', N'U') IS NULL CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER, PRIMARY KEY (TXID) )
                             CREATE_TABLES_ON_STARTUP = TRUE
                             </attribute>
                             <!-- Uncomment to override the transaction timeout for recovery per queue/subscription, in seconds -->
                             <!--attribute name="RecoveryTimeout">0</attribute-->
                             <!-- The number of blobs to load at once during message recovery -->
                             <attribute name="RecoverMessagesChunk">0</attribute>
                             </mbean>
                            
                            </server>


                            The changes that I made are highlighted in red. What I did was to add a check to verify that the table does not exist prior to creating it. I could find no similar check to verify that the index does not exist , so I wrote a scalar function that would perform the check. I ran the create script as the jboss user. The function definition follows:
                            use jboss
                            go
                            
                            IF OBJECT_ID(N'dbo.CHECK_FOR_INDEX', N'FN') IS NOT NULL
                             DROP FUNCTION dbo.CHECK_FOR_INDEX;
                            GO
                            
                            CREATE FUNCTION dbo.CHECK_FOR_INDEX (@TABLE_NAME VARCHAR(256), @INDEX_NAME VARCHAR(256))
                            RETURNS int
                            AS
                            BEGIN
                            DECLARE @RETV int,
                             @TABLE_ID int
                            
                             set @TABLE_ID=OBJECT_ID(@TABLE_NAME,N'U');
                            
                             IF @TABLE_ID IS NULL
                             BEGIN;
                             RETURN 0;
                             END;
                            
                             SELECT @RETV = COUNT(*)
                             FROM sys.indexes AS i
                             INNER JOIN sys.data_spaces AS ds ON i.data_space_id = ds.data_space_id
                             WHERE is_hypothetical = 0 AND i.index_id <> 0
                             AND i.object_id = @TABLE_ID
                             AND i.name=@INDEX_NAME;
                             --PRINT 'Database = ' + @TABLE_NAME + ' Index = ' + @INDEX_NAME
                             --PRINT @RETV;
                             RETURN @RETV;
                            END;
                            GO
                            


                            To complete the changes I made, to resolve the issue, here is the mssql-jdbc-state-service.xml file, with my changes highlighted in red:

                            mssql-jdbc-state-service.xml
                            <?xml version="1.0" encoding="UTF-8"?>
                            
                            <!-- $Id: hsqldb-jdbc-state-service.xml 63362 2007-06-05 19:19:17Z adrian@jboss.org $ -->
                            
                            <server>
                            
                             <!-- ==================================================================== -->
                             <!-- JBossMQ State Management -->
                             <!-- -->
                             <!-- This configuration uses DefaultDS which by default is HSQLDB -->
                             <!-- -->
                             <!-- If you want to use a different database/jndi name then either change -->
                             <!-- the ConnectionManager property, e.g. -->
                             <!-- Oracle: jboss.jca:service=DataSourceBinding,name=OracleDS -->
                             <!-- or -->
                             <!-- change the jndi binding DefaultDS to be the database you want to use.-->
                             <!-- ==================================================================== -->
                            
                             <!-- A Statemanager that stores state in the database -->
                             <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager"
                             name="jboss.mq:service=StateManager">
                             <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
                             <attribute name="SqlProperties">
                             CREATE_TABLES_ON_STARTUP = TRUE
                             CREATE_USER_TABLE = IF OBJECT_ID (N'dbo.JMS_USERS', N'U') IS NULL CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
                             CLIENTID VARCHAR(128) NULL, PRIMARY KEY(USERID))
                             CREATE_ROLE_TABLE = IF OBJECT_ID (N'dbo.JMS_ROLES', N'U') IS NULL CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
                             PRIMARY KEY(USERID, ROLEID))
                             CREATE_SUBSCRIPTION_TABLE = IF OBJECT_ID (N'dbo.JMS_SUBSCRIPTIONS', N'U') IS NULL CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
                             SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
                             SELECTOR VARCHAR(255) NULL, PRIMARY KEY(CLIENTID, SUBNAME))
                             GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                             LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                             GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
                             INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
                             UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
                             REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
                             GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
                             GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
                             POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
                             POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
                             POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
                             POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
                             POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
                             POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
                             POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
                             POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
                             POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
                             POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
                             POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
                             POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
                             POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
                             POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')
                             </attribute>
                             </mbean>
                            
                            </server>



                            • 11. Re: MSSQL XA datasource throws RollbackException on cluster
                              vickyk

                              No you don't need to create SQL function , the org.jboss.mq.pm.jdbc2.PersistenceManager takes care of creation of the tables . Table creation is controlled by defining the sqlproperties , have a look at
                              http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQStateJDBC

                              I don't understand why the setting of CREATE_TABLES_ON_STARTUP= false is still creating the SQL tables , you seem to be doing something wrong . You should enable trace logging for org.jboss.mq to troubleshoot this issue .
                              Go to the Jboss Messaging user forum , this issues is not JCA related .

                              Let me point out the code which reads the CREATE_TABLES_ON_STARTUP property

                               public void startService() throws Exception
                               {
                              .....................................
                               createTables = sqlProperties.getProperty("CREATE_TABLES_ON_STARTUP", "true").equalsIgnoreCase("true");
                              ......................................
                               }
                              
                              
                              
                              

                              if (createTables)
                               {
                               c = this.getConnection();
                              
                               boolean createdMessageTable = false;
                               try
                               {
                               stmt = c.prepareStatement(CREATE_MESSAGE_TABLE);
                               stmt.executeUpdate();
                               createdMessageTable = true;

                              http://anonsvn.jboss.org/repos/jbossas/branches/Branch_4_0/messaging/src/main/org/jboss/mq/pm/jdbc2/PersistenceManager.java
                              http://anonsvn.jboss.org/repos/jbossas/branches/Branch_4_0/messaging/src/main/org/jboss/mq/pm/jdbc2/MSSQLPersistenceManager.java