1 Reply Latest reply on Mar 24, 2006 3:36 AM by thomas.guenter1

    Yet another XAException with MS SQLServer 2000 Driver for JD

    thomas.guenter1

      Hi folks,

      i've the following configuration in my project:
      JBoss 4.0.1 SP1
      j2sdk1.4.2_06
      DB server: MS SQLServer 2000 (SP4)
      JDB driver: MS SQLServer 2000 Driver for JDBC (SP3)
      All XA stuff with dll and SQL done right at server side.

      1) When the datasource below is deployed the exception further down is thrown. I guess it has something to do with the well known MS driver problems. Can anyone of you give me a hint, which f.. MS patch I have to install to get this driver work.
      2) The JNetDirect driver (latest version 5.5) deploys but we have serious deadlock problems with our application, so I'm searching for some alternatives. So has anyone experience with any kind of other (really XA compliant) driver that he/she could pass to me?

      Any help is appreciated.

      Thanks in advance.

      --thomas

      -----------------

      <xa-datasource>
      <jndi-name>BFlowDS</jndi-name>
      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-datasource-class>
      <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
      <xa-datasource-property name="DatabaseName">xt14pl2</xa-datasource-property>
      <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
      <xa-datasource-property name="SendStringParametersAsUnicode">false</xa-datasource-property>
      <user-name>xt14pl2</user-name>
      xt14pl2
      <no-tx-separate-pools />
      <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
      <min-pool-size>5</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <blocking-timeout-millis>500000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>

      <type-mapping>MS SQLSERVER2000</type-mapping>

      </xa-datasource>


      13:06:25,107 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=pc38712/1, BranchQual=, localId=1] errorCode=XAER_RMERR
      javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_commit (40000000) returns -4
      at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
      at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.commit(Unknown Source)
      at com.microsoft.jdbcx.base.BaseXAResource.commit(Unknown Source)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.commit(XAManagedConnection.java:176)
      at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
      at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1674)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:312)
      at org.jboss.tm.TxManager.commit(TxManager.java:200)
      at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:624)
      at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:482)
      at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:399)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)

      -----------------

        • 1. Re: Yet another XAException with MS SQLServer 2000 Driver fo
          thomas.guenter1

          Hi again,

          that's what I've found out for my own in the meanwhile:

          1) Obviously there's still a bug in the MS JDBC driver regarding the sendStringParametersAsUnicode=false parameter setting.
          See (quite below) in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=262525&SiteID=1.
          Although this thread talks about the driver for SqlServer 2005 it may be that the bug affects 2000 drivers also. Unfortunately that doesn't solve my problem because if I remove the parameter from the datasource definition or set it to true it still throws those XAException with return code -4. Btw does anybody know what's the meaning of this return code or could reply me a rtfm to the approriate link? I've searched the web for a list of those return codes but didn't find something.

          2) I assume there's something wrong with the MSDTC for Windows Server 2000. The logfile C:\WINNT\system32\dtcxa.log says something about
          "ProcId = 3312, Time hh:mm:ss:ms = 18:32:59:254
          XAER_NOTA: (Xa...) MSDTC No transaction with the given XID."
          It seems to be something at server side with MSDTC but I didn't figure out what it could be. Any ideas?

          Sorry that this post seems to move from a JBoss issue to this annoying microsoft stuff. But maybe it's for your interest also.:-)

          --thomas