Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.3
-
Fix Version/s: 1.3.3
-
Labels:None
-
Environment:Spring 2.5.6, Jetty 7, JDK 6, 1.3.3-RC2 btm
-
Number of attachments :
Description
Hi.
I want to use JMS + JDBC with BTM Tx.
But using the connection pooling stuff, i found this warning in my logs:
WARN [bitronix-recovery-thread] bitronix.tm.recovery.Recoverer: error running recovery on resource 'activemq', resource marked as failed (background recoverer will retry recovery)
bitronix.tm.recovery.RecoveryException: error starting recovery
at bitronix.tm.resource.jms.PoolingConnectionFactory.startRecovery(PoolingConnectionFactory.java:128)
at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:203)
at bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:174)
at bitronix.tm.recovery.Recoverer.run(Recoverer.java:113)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jms.InvalidClientIDException: Broker: indexBroker - Client: annotatedIndexService already connected from vm://indexBroker#0
This line:
recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
does provoke this exception.
After this one there are more warnings coming to the log:
WARN [bitronix-recovery-thread] bitronix.tm.recovery.Recoverer: error running recovery on resource 'activemq', resource marked as failed (background recoverer will retry recovery)
bitronix.tm.recovery.RecoveryException: error ending recovery
at bitronix.tm.resource.jms.PoolingConnectionFactory.endRecovery(PoolingConnectionFactory.java:143)
at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:207)
at bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:174)
at bitronix.tm.recovery.Recoverer.run(Recoverer.java:113)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at bitronix.tm.resource.jms.PoolingConnectionFactory.endRecovery(PoolingConnectionFactory.java:137)
... 4 more
A NPE is happening there.
Looking at the code it seems like recoveryXAResourceHolder is only initalized if the connection can be aquired - but if this failes like above endRecovery should do something about.
Fixed in trunk and will be part of BTM 1.3.3 final. I'd be glad if you could test the fix.
Thanks for the report!