How can I find out the cause of a javax.transaction.TransactionRolledbackException?
shilpa Tiwari A TransactionRolledBackException would occur if :
- There has been an exception within the scope of the transaction. If you have proper logging in your program and log all the possible exceptions then you could easily see the reason of a TransactionRolledBackException. Or more precisely the exception which led to the rollback. This Exception could be seen in the stack trace if you dump your stack trace.
- If the transaction timed out before the completion of the task. In this case case you could see in the stack trace that the transaction was timed out and then the TransactionRolledBackException as it would be thrown once timeout occurs.