SQL Server 2005 JDBC config?
clumpkin Apr 4, 2006 4:59 PMI've seen one or two posts concerning issues with this driver, but none have addressed the issue I'm having. Here is my datasource XML:
<?xml version="1.0" encoding="UTF-8"?> <!-- The SQL Server 2005 Database JCA connection factory config $Id: sql2005jdbc-ds.xml,v 1.0 2005/10/7 mattn Exp $ --> <datasources> <!-- Non-transactional datasource (uses no transactions) --> <no-tx-datasource> <!-- The jndi name of the DataSource, it is prefixed with java:/ --> <!-- Datasources are not available outside the virtual machine --> <jndi-name>OnBoard</jndi-name> <!-- The connection url --> <connection-url>jdbc:sqlserver://localhost:1433;databaseName=OnBoard</connection-url> <!-- The driver class --> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <!-- The login and password --> <user-name>aaa</user-name> <password>bbb</password> <!-- This will be run before a managed connection is removed from the pool for use by a client <check-valid-connection-sql>select 1</check-valid-connection-sql>--> <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use --> <min-pool-size>10</min-pool-size> <!-- The maximum connections in a pool/sub-pool --> <max-pool-size>2000</max-pool-size> <!-- metadata for datasource type --> <metadata> <type-mapping>MS SQLSERVER2000</type-mapping> </metadata> </no-tx-datasource> <!-- Local transaction datasource (uses no transactions) --> <local-tx-datasource> <!-- The jndi name of the DataSource, it is prefixed with java:/ --> <!-- Datasources are not available outside the virtual machine --> <jndi-name>TXOnBoard</jndi-name> <!-- The connection url --> <connection-url>jdbc:sqlserver://localhost:1433;databaseName=OnBoard</connection-url> <!-- The driver class --> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <!-- The login and password --> <user-name>aaa</user-name> <password>bbb</password> <!-- This will be run before a managed connection is removed from the pool for use by a client <check-valid-connection-sql>select 1</check-valid-connection-sql>--> <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use --> <min-pool-size>10</min-pool-size> <!-- The maximum connections in a pool/sub-pool --> <max-pool-size>2000</max-pool-size> <!-- metadata for datasource type --> <metadata> <type-mapping>MS SQLSERVER2000</type-mapping> </metadata> </local-tx-datasource> </datasources>
Here is the stack trace I'm getting:
2006-04-04 16:52:29,714 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=ws-lumpkin/1, BranchQual=, localId=1] errorCode=XA_UNKNOWN(0)
org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.))
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:702)
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)
Has anyone successfully configured this driver?