mysql and mssql

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

mysql and mssql

caroline.n
Hi

I’m trying to use BTM as a transaction manager for mysql and mssql

I’m getting the following error.

java.sql.SQLException: error enlisting a JdbcConnectionHandle of a JdbcPooledConnection from datasource jdbc/ARC_DW_SPA_APP_DEV in state ACCESSIBLE with usage count 1 wrapping a JDBC LrcXAConnection on ConnectionID:1 on a JDBC LrcConnectionHandle on a JDBC LrcXAResource in state NO_TX

StackTrace:

java.sql.SQLException: error enlisting a JdbcConnectionHandle of a JdbcPooledConnection from datasource jdbc/ARC_DW_SPA_APP_DEV in state ACCESSIBLE with usage count 1 wrapping a JDBC LrcXAConnection on ConnectionID:1 on a JDBC LrcConnectionHandle on a JDBC LrcXAResource in state NO_TX

      at bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(JdbcConnectionHandle.java:86)

      at bitronix.tm.resource.jdbc.JdbcConnectionHandle.prepareStatement(JdbcConnectionHandle.java:243)

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

      at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)

      at $Proxy1.prepareStatement(Unknown Source)

      at jtatest.BTMWithMySqlAndMsSql.main(BTMWithMySqlAndMsSql.java:128)

Caused by: bitronix.tm.internal.BitronixSystemException: cannot enlist more than one non-XA resource, tried enlisting an XAResourceHolderState with uniqueName=jdbc/ARC_DW_SPA_APP_DEV XAResource=a JDBC LrcXAResource in state NO_TX with XID null, already enlisted: an XAResourceHolderState with uniqueName=jdbc/javatest XAResource=a JDBC LrcXAResource in state STARTED (started) with XID a Bitronix XID [3137322E32302E312E3933000001369BC3076500000000 : 3137322E32302E312E3933000001369BC3082D00000002]

      at bitronix.tm.internal.XAResourceManager.enlist(XAResourceManager.java:107)

      at bitronix.tm.BitronixTransaction.enlistResource(BitronixTransaction.java:93)

      at bitronix.tm.resource.common.TransactionContextHelper.enlistInCurrentTransaction(TransactionContextHelper.java:70)

      at bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(JdbcConnectionHandle.java:84)

      ... 8 more

Apr 10, 2012 3:48:31 PM bitronix.tm.BitronixTransactionManager shutdown

INFO: shutting down Bitronix Transaction Manager

Can you please help?
Thanks,
Caroline
Loading...