Propagation.REQUIRES_NEW Bitronix error

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

Propagation.REQUIRES_NEW Bitronix error

Fernando Franzini
Hi Folks

I can not use Propagation.REQUIRES_NEW in my spring beans. Every time you run it, it generates the following error:

Caused by: bitronix.tm.internal.BitronixSystemException: cannot resume a Bitronix Transaction with GTRID [6274782D646573656E762D327063000000002E9ED6A600000009], status=ACTIVE, 1 resource(s) enlisted (started Fri Jan 09 22:16:01 BRT 1970), error=XAER_DUPID
        at bitronix.tm.BitronixTransactionManager.resume(BitronixTransactionManager.java:219)
        at org.springframework.transaction.jta.JtaTransactionManager.doJtaResume(JtaTransactionManager.java:973)
        at org.springframework.transaction.jta.JtaTransactionManager.doResume(JtaTransactionManager.java:942)
        ... 84 more
Caused by: javax.transaction.xa.XAException: XAER_DUPID: The XID identifies an existing transaction.
        at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:707)
        at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:191)
        at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
        at bitronix.tm.internal.XAResourceHolderState.start(XAResourceHolderState.java:220)
        at bitronix.tm.internal.XAResourceManager.enlist(XAResourceManager.java:111)
        at bitronix.tm.internal.XAResourceManager.resume(XAResourceManager.java:176)
        at bitronix.tm.BitronixTransactionManager.resume(BitronixTransactionManager.java:213)
        ... 86 more

I can not find any information about it. Can anyone help me?
Best Regards.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Propagation.REQUIRES_NEW Bitronix error

Fernando Franzini
I just tested, just works Propagation.REQUIRED and Propagation.SUPPORTS ... and other propagation not generating the same error.
Someone?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Propagation.REQUIRES_NEW Bitronix error

Ludovic Orban-2
In reply to this post by Fernando Franzini
According to the Jtds source code, you're running in emulated XA mode.
And digging the code a bit more, the XAResource.TMJOIN flag isn't
implemented by the XAResource.start() method despite the fact that
XAResource.isSameRM() returned true. At least this is true for the
version I checked which is 1.3.1.

In short, the driver you're using has quite an incomplete/broken XA
compliance, at least in XA emulation mode.

I can think of three alternatives:

1) Use the Last Resource Commit optimization over your driver instead
of using its broken XA emulation support.
2) Don't use the XA emulation mode, install the XA stored procedures
and run with true XA support.
3) Set the useTmJoin config property to false on your
PoolingDataSource. This may or may not help though.


On Wed, Oct 8, 2014 at 2:53 PM, Fernando Franzini
<[hidden email]> wrote:

> Hi Folks
>
> I can not use Propagation.REQUIRES_NEW in my spring beans. Every time you
> run it, it generates the following error:
>
> *Caused by: bitronix.tm.internal.BitronixSystemException: cannot resume a
> Bitronix Transaction with GTRID
> [6274782D646573656E762D327063000000002E9ED6A600000009], status=ACTIVE, 1
> resource(s) enlisted (started Fri Jan 09 22:16:01 BRT 1970),
> error=XAER_DUPID
>         at
> bitronix.tm.BitronixTransactionManager.resume(BitronixTransactionManager.java:219)
>         at
> org.springframework.transaction.jta.JtaTransactionManager.doJtaResume(JtaTransactionManager.java:973)
>         at
> org.springframework.transaction.jta.JtaTransactionManager.doResume(JtaTransactionManager.java:942)
>         ... 84 more
> Caused by: javax.transaction.xa.XAException: XAER_DUPID: The XID identifies
> an existing transaction.
>         at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:707)
>         at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:191)
>         at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
>         at
> bitronix.tm.internal.XAResourceHolderState.start(XAResourceHolderState.java:220)
>         at
> bitronix.tm.internal.XAResourceManager.enlist(XAResourceManager.java:111)
>         at
> bitronix.tm.internal.XAResourceManager.resume(XAResourceManager.java:176)
>         at
> bitronix.tm.BitronixTransactionManager.resume(BitronixTransactionManager.java:213)
>         ... 86 more*
> I can not find any information about it. Can anyone help me?
> Best Regards.
>
>
>
> --
> View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Propagation-REQUIRES-NEW-Bitronix-error-tp1668.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
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Propagation.REQUIRES_NEW Bitronix error

Fernando Franzini
HI Ludovic
Thanks for help...

1) Use the Last Resource Commit optimization over your driver instead
of using its broken XA emulation support.

I do not get this option. Could you help me?

2) Don't use the XA emulation mode, install the XA stored procedures
and run with true XA support.
 
I did not change the production environment so that option is out ...

3) Set the useTmJoin config property to false on your
PoolingDataSource. This may or may not help though.

did not work...when I set useTmJoin= false, start another error:
Caused by: java.lang.IllegalArgumentException: cannot create a pool with min 2 connection(s) and max 0 connection(s)
        at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:59)
That does not make sense because my setup this way:
<property name="className" value="net.sourceforge.jtds.jdbcx.JtdsDataSource" />
<property name="minPoolSize" value="2" />
<property name="maxIdleTime" value="3" />
<property name="maxPoolSize" value="6" />
<property name="useTmJoin" value="false" />


I could not use another jdbc driver compatible? Do you know any?

Best Regards.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Propagation.REQUIRES_NEW Bitronix error

Brett Wooldridge-2
Are you using the jTDS driver for SQL Server, or Sybase?  If SQL Server you might try the official Microsoft driver.


On Wed, Oct 8, 2014 at 11:42 PM, Fernando Franzini <[hidden email]> wrote:
HI Ludovic
Thanks for help...

/1) Use the Last Resource Commit optimization over your driver instead
of using its broken XA emulation support. /
*I do not get this option. Could you help me?*

/2) Don't use the XA emulation mode, install the XA stored procedures
and run with true XA support./
*I did not change the production environment so that option is out ...*

/3) Set the useTmJoin config property to false on your
PoolingDataSource. This may or may not help though. /
*did not work...when I set useTmJoin= false, start another error:
Caused by: java.lang.IllegalArgumentException: cannot create a pool with min
2 connection(s) and max 0 connection(s)
        at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:59)
That does not make sense because my setup this way:
<property name="className" value="net.sourceforge.jtds.jdbcx.JtdsDataSource"
/>
<property name="minPoolSize" value="2" />
<property name="maxIdleTime" value="3" />
<property name="maxPoolSize" value="6" />
<property name="useTmJoin" value="false" />*

I could not use another jdbc driver compatible? Do you know any?

Best Regards.



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Propagation-REQUIRES-NEW-Bitronix-error-tp1668p1671.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
|  
Report Content as Inappropriate

Re: Propagation.REQUIRES_NEW Bitronix error

Ludovic Orban-2
In reply to this post by Fernando Franzini
Check this up: http://docs.codehaus.org/display/BTM/LastResourceCommit2x

On Wed, Oct 8, 2014 at 4:42 PM, Fernando Franzini
<[hidden email]> wrote:

> HI Ludovic
> Thanks for help...
>
> /1) Use the Last Resource Commit optimization over your driver instead
> of using its broken XA emulation support. /
> *I do not get this option. Could you help me?*
>
> /2) Don't use the XA emulation mode, install the XA stored procedures
> and run with true XA support./
> *I did not change the production environment so that option is out ...*
>
> /3) Set the useTmJoin config property to false on your
> PoolingDataSource. This may or may not help though. /
> *did not work...when I set useTmJoin= false, start another error:
> Caused by: java.lang.IllegalArgumentException: cannot create a pool with min
> 2 connection(s) and max 0 connection(s)
>         at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:59)
> That does not make sense because my setup this way:
> <property name="className" value="net.sourceforge.jtds.jdbcx.JtdsDataSource"
> />
> <property name="minPoolSize" value="2" />
> <property name="maxIdleTime" value="3" />
> <property name="maxPoolSize" value="6" />
> <property name="useTmJoin" value="false" />*
>
> I could not use another jdbc driver compatible? Do you know any?
>
> Best Regards.
>
>
>
> --
> View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Propagation-REQUIRES-NEW-Bitronix-error-tp1668p1671.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
>
>

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

    http://xircles.codehaus.org/manage_email


Loading...