-
1. Re: What is the REASON for the exception: could not enlist in transaction
tomjenkinson Dec 4, 2012 4:53 AM (in response to rpraveenkumar)Hi,
I used google to find this for you: https://community.jboss.org/wiki/CouldNotEnlistInTransaction
Looks like the transaction timed out at a guess. The error message is actually coming from JCA rather than JBTM.
Tom
-
2. Re: What is the REASON for the exception: could not enlist in transaction
rpraveenkumar Dec 6, 2012 11:04 AM (in response to tomjenkinson)Hi Tom,
thanks for your reply, i dont think this is because of transaction time out. because i experimented by setting a small time out for a transaction, "Interrupted while requesting permit" msg was there in logs.. but this msg was not there when could not enlist error came..
it would be great if u tell the possible scenarios this could not enlist will come. note that i am using only one database (mysql) and only one local-tx-datasource..
i dont think even a transaction being marked as rollback will throw this could not enlist msg...
-
3. Re: What is the REASON for the exception: could not enlist in transaction
mmusgrov Dec 6, 2012 11:16 AM (in response to rpraveenkumar)The article Tom referenced says that there are other reasons besides timeouts for a transaction being marked as rollback only. For example if you try to access two non XA databases you may see this error (but I am sure there are also be other reasons why a transaciton can be marked rollback only).
What do you mean by "i am using only one database (mysql) and only one local-tx-datasource". Is there anything else in the logs that might indicate what is going on.
-
4. Re: What is the REASON for the exception: could not enlist in transaction
rpraveenkumar Dec 6, 2012 11:24 AM (in response to mmusgrov)Hi Michael,
i am using only one <local-tx-datasource>
no info about timeout, rollback, deadlock in logs... this exception comes as:
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed; - nested throwable: (javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed)
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:
** BEGIN NESTED EXCEPTION **
com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2631)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1548)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1659)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3112)
at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5209)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.begin(LocalManagedConnection.java:135)
at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:650)
at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1196)
at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:649)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:437)
at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:323)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:502)
.
.
.
.
-
5. Re: What is the REASON for the exception: could not enlist in transaction
tomjenkinson Dec 6, 2012 11:35 AM (in response to rpraveenkumar)As I mentioned before, this looks like a JCA question really, why not ask it over at the IronJacamar forums? Those guys should be able to assist you better than we can on that type of issue.
-
6. Re: What is the REASON for the exception: could not enlist in transaction
mmusgrov Dec 6, 2012 11:47 AM (in response to rpraveenkumar)Can you post your datasource and/or persistence unit configuration. Are there any other errors or warnings in the logs
-
7. Re: What is the REASON for the exception: could not enlist in transaction
rpraveenkumar Dec 6, 2012 11:52 AM (in response to mmusgrov)Ok Tom, i will post there...
Michael, now i dont have access to that.. but i am just interested what would be the reason for the above error to come, if i use only one <local-tx-datasource> and there is no rollback, timeout, deadlock info in logs.. just the above msg keeps on printing in logs.. if i restart, its working good.. and this is not occuring frequently...
-
8. Re: What is the REASON for the exception: could not enlist in transaction
tomjenkinson Jan 24, 2013 7:49 AM (in response to rpraveenkumar)Hi rpraveenkumar, would you be able to update this thread with a link to the question you asked in the JCA forum as it will be useful for others with the same issue.
Thanks,
Tom