Home > Archive > SQL Server JDBC > April 2006 > SQL 2005 JDBC driver + JBoss: COMMIT has no corresponding BEGIN









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL 2005 JDBC driver + JBoss: COMMIT has no corresponding BEGIN
clumpkin@gmail.com

2006-04-05, 11:24 am

I'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"?>
<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;datab
aseName=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>

<!-- 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;datab
aseName=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>

<!-- 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:X
idImpl[FormatId=257,
GlobalId=ws-lumpkin/1, BranchQual=, localId=1] errorCode=XA_UNKNOWN
(0)
org.jboss.resource.connectionmanager. JBossLocalXAExceptio
n: could not
commit local tx; - nested throwable:
(org.jboss.resource. JBossResourceExcepti
on: 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(TxConnectionM
anager.java:702)
at
org.jboss.tm. TransactionImpl$Reso
urce. commit(TransactionIm
pl.java:2141)
at
org.jboss.tm.TransactionImpl. commitResources(Tran
sactionImpl.java:1674)
at org.jboss.tm.TransactionImpl. commit(TransactionIm
pl.java:312)
at org.jboss.tm.TxManager.commit(TxManager.java:200)

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

Has anyone successfully configured this driver?

Thanks,
Chris

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com