[jboss-user] [Clustering/JBoss] - Re: For JBoss 4.2.1, will either SQL Server 2005 or MySQL 5.

ratrask do-not-reply at jboss.com
Fri Nov 30 00:31:04 EST 2007


Well no responses, but I guess that is what is to be expected when I don't gather my thoughts properly before I post. Here is some additional information that I posted on the JCA forum. I'm not sure that that is the right place, so I'll update this topic as well.

--

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 in the SQL Server installation 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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109139#4109139

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109139



More information about the jboss-user mailing list