PooledConnection Has Already Been Closed Exception with Hibernate 5.1.0 [SPR-16272] #20819
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: invalid
An issue that we don't feel is valid
Ryan O'Meara opened SPR-16272 and commented
When using Spring ORM (4.3.9) and Hibernate (5.1.0) and using a Hibernate user type, on the second use of the type, I get an exception:
This appears to have been addressed previously in #15028, however the fix was implemented in org.springframework.orm.jpa.vendor.HibernateJpaDialect.HibernateConnectionHandle by checking Hibernate's SessionImpl for the prescence of a method called "connection" - this was present in Hibernate 3.x, but not in Hibernate 4.x, so it's existence was used to determine if HibernateConnectionHandle should close the connection.
However, in Hibernate 5.1.0, SessionImpl has a method called "connection" again - so HibernateConnectionHandle now does the Hibernate 3.x behavior if hibernate 5.x is being used, causing this error to re-surface
Affects: 4.3.9, 4.3.13
The text was updated successfully, but these errors were encountered: