Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.2
-
Fix Version/s: 1.3.3
-
Labels:None
-
Environment:Windows XP, MySQL, Hibernate, Spring
-
Number of attachments :
Description
When I hit a DB constraint violation, I get the expected constraint violation exception and rollback. But in addition, BTM also logs some worrisome-looking exceptions concerning the connection pool and the management MBean. In case this might be serious, I am logging this issue. I did a run with BTM's debug logging enabled and am attaching the log. The error occurs at the end of the log.
16:01:12,546 WARN BitronixTransaction: Synchronization.afterCompletion() call failed for a DeferredReleaseSynchronization of a JdbcPooledConnection from datasource makanasolutions DB in state IN_POOL wrapping a LrcXAConnection
java.lang.IllegalArgumentException: cannot switch state from IN_POOL to IN_POOL
at bitronix.tm.resource.common.AbstractXAStatefulHolder.setState(AbstractXAStatefulHolder.java:34)
at bitronix.tm.resource.common.DeferredReleaseSynchronization.afterCompletion(DeferredReleaseSynchronization.java:30)
at bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:382)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:188)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:96)
...
16:01:12,562 WARN ManagementRegistrar: cannot unregister object with name bitronix.tm:type=Transaction,Gtrid=4B6168756E612D62746D0000011D9CCEB756000000D6
bitronix.tm.internal.BitronixRuntimeException: cannot callunregisterMBean
at bitronix.tm.utils.ManagementRegistrar.mbeanServerCall(ManagementRegistrar.java:95)
at bitronix.tm.utils.ManagementRegistrar.unregister(ManagementRegistrar.java:74)
at bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:388)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:188)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:96)
...
It looks like you're running many threads in parallel according to the log file you attached but I cannot make sure this assumption is actually true.
If that's the case, it would be very useful to include the thread's name in the log file as well and to know if the problem can be reproduced in a single-threaded environment and if so, attach that log as well.