| I've got an exception without the proper cause, making it difficult to understand what happened:
Using a breakpoint in TransactionImpl I see wrappedException = e.getCause(); (line 70), which returns null. In my case, the exception was javax.persistence.EntityExistsException: A different object with the same identifier value was already associated with the session. I assume a check should be done and use the exception itself if the cause is null. |