LrcXADataSource and jTDS Driver

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LrcXADataSource and jTDS Driver

Daniel Zweifel
Hello

I'm not sure if this is the right place for this question but I'll try.

My environment is FuseESB with Geronimo Transaction Manager. The database is SQLServer without the XA extension. Up to now this is the only XAResource I have to care about. I'm using LrcXADataSource as my XADataSource, wrapping the SQLServer driver. Configuration in blueprint.xml is:

        <bean id="xaDataSourceBean" class="bitronix.tm.resource.jdbc.lrc.LrcXADataSource">
                <property name="driverClassName" value="${database.driverClassName}"/>
                <property name="url" value="${database.connection.url}" />
                <property name="user" value="${database.username}" />
                <property name="password" value="${database.password}" />
        </bean>

When I use the Microsoft SQLServer driver (version 4.0) everything works fine. Because the jTDS driver is supposed to be much faster I tried to replace the MS driver with the jTDS driver (version 1.2.4). With exactly the same constellation and the same calls I get the following exception:

11:32:19,566 | ERROR | qtp976633532-161 | RollbackTask                     | 119 - org.apache.aries.transaction.manager - 1.0.1.fuse-71-047 | Unexpected exception committing a JDBC LrcXAResource in state NO_TX; continuing to commit other RMs
bitronix.tm.internal.BitronixXAException: resource never started on XID [Xid:globalId=65ffffffadffffff9b613c1006f72672e6170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64,branchId=100063ffffffadffffff9b613c1006170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64]
        at bitronix.tm.resource.jdbc.lrc.LrcXAResource.rollback(LrcXAResource.java:282)
        at org.apache.geronimo.transaction.manager.RollbackTask.run(RollbackTask.java:64)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:599)
        at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:498)
        at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_04]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_04]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_04]
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
        at $Proxy26.rollback(Unknown Source)
        at org.apache.aries.transaction.TransactionAttribute$4.finish(TransactionAttribute.java:92)
        at org.apache.aries.transaction.TxInterceptorImpl.postCallWithException(TxInterceptorImpl.java:61)
        at org.apache.aries.blueprint.proxy.Collaborator.postInvokeExceptionalReturn(Collaborator.java:136)
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:82)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)

Has anybody seen similar problems with the jTDS driver or is it just impossible to use it with LrcXADataSource?

Thanks for any ideas/answers

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: LrcXADataSource and jTDS Driver

Brett Wooldridge-2
From what I understand, jTDS will emulate XA by default (see the xaEmulation property in their FAQ).  So, even though you don't have the XA extension installed on SqlServer, I would try using the ordinary "XA" datasource (net.sourceforge.jtds.jdbcx.JtdsDataSource) and the ordinary pooling datasource (non-Lrc) in Bitronix.

Brett



On Wed, Jan 23, 2013 at 5:08 PM, Daniel Zweifel <[hidden email]> wrote:

Hello

I'm not sure if this is the right place for this question but I'll try.

My environment is FuseESB with Geronimo Transaction Manager. The database is
SQLServer without the XA extension. Up to now this is the only XAResource I
have to care about. I'm using LrcXADataSource as my XADataSource, wrapping
the SQLServer driver. Configuration in blueprint.xml is:

        <bean id="xaDataSourceBean"
class="bitronix.tm.resource.jdbc.lrc.LrcXADataSource">
                <property name="driverClassName" value="${database.driverClassName}"/>
                <property name="url" value="${database.connection.url}" />
                <property name="user" value="${database.username}" />
                <property name="password" value="${database.password}" />
        </bean>

When I use the Microsoft SQLServer driver (version 4.0) everything works
fine. Because the jTDS driver is supposed to be much faster I tried to
replace the MS driver with the jTDS driver (version 1.2.4). With exactly the
same constellation and the same calls I get the following exception:

11:32:19,566 | ERROR | qtp976633532-161 | RollbackTask                     |
119 - org.apache.aries.transaction.manager - 1.0.1.fuse-71-047 | Unexpected
exception committing a JDBC LrcXAResource in state NO_TX; continuing to
commit other RMs
bitronix.tm.internal.BitronixXAException: resource never started on XID
[Xid:globalId=65ffffffadffffff9b613c1006f72672e6170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64,branchId=100063ffffffadffffff9b613c1006170616368652e61726965732e7472616e73616374696f6e0000000000000000000000000000,length=64]
        at
bitronix.tm.resource.jdbc.lrc.LrcXAResource.rollback(LrcXAResource.java:282)
        at
org.apache.geronimo.transaction.manager.RollbackTask.run(RollbackTask.java:64)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:599)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:498)
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_04]
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_04]
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_04]
        at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_04]
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
        at $Proxy26.rollback(Unknown Source)
        at
org.apache.aries.transaction.TransactionAttribute$4.finish(TransactionAttribute.java:92)
        at
org.apache.aries.transaction.TxInterceptorImpl.postCallWithException(TxInterceptorImpl.java:61)
        at
org.apache.aries.blueprint.proxy.Collaborator.postInvokeExceptionalReturn(Collaborator.java:136)
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:82)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)

Has anybody seen similar problems with the jTDS driver or is it just
impossible to use it with LrcXADataSource?

Thanks for any ideas/answers

Daniel
--
View this message in context: http://old.nabble.com/LrcXADataSource-and-jTDS-Driver-tp34934076p34934076.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: LrcXADataSource and jTDS Driver

Daniel Zweifel
This post has NOT been accepted by the mailing list yet.
Thanks for the hint, the problem is solved. I was working with an older version of the jTDS driver, with the latest version (1.3.0) everything works as expected.

Daniel