JPATransactionManager and HibernateJpaDialect is not handling gracefully a org.hibernate.TransactionException #28184
Labels
for: external-project
Needs a fix in external project
in: data
Issues in data modules (jdbc, orm, oxm, tx)
Affects:
Spring Orm: 5.3.14
Spring boot version: 2.6.2
Spring data jpa: 2.6.0
Spring Integration version: 5.5.6
Issue:
Seems like
JPATransactionManager
andHibernateJpaDialect
cannot transform aorg.hibernate.TransactionException
to the right JPA exception based on the internalSQLException
, as you can see in the following stacktrace:The transformation process should arrive to a
CannotAcquireLockException
, here, as the error is database serialization related.I was searching for a way to extend the transform behavior on this line, but, cannot find a way to customize this transformation on the
HibernateJpaDialect
for thatorg.hibernate.TransactionException
.Note that I created an issue on Spring Integration and Hibernate, as I think Hibernate is the one who is not throwing the right context exception, however, I would like to be able to customize the behavior somehow in the Spring side.
The text was updated successfully, but these errors were encountered: