You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HibernateTransactionManager (unintentionally) bound to Hibernate 5.2 SharedSessionContractImplementor [SPR-17557] #22089
This seems to be caused by the sessionImpl::connection method reference, where sessionImpl is a SessionImplementor type but the connection() method is inherited from SharedSessionContractImplementor since Hibernate ORM 5.2 there.
Taras Tielkes, have you seen this as a recent regression in Spring Framework 5.1.x? Does it work with Spring Framework 5.0.x still?
As far as I can see, a simple change to () -> sessionImpl.connection() solves the problem at bytecode level since it compiles to a SessionImplementor reference again. Assuming it still works with Spring Framework 5.0.x (where a similar direct call in in place), that's the change I intend to apply for the 5.1.4 release.
Juergen Hoeller, for this project we're just now migrating from 4.3.x to 5.1.x, so I don't have any feedback for 5.0.x versions.
However, I'd be happy to check later this evening.
Juergen Hoeller I have tried the SNAPSHOT from last night, and I can confirm that it fixes the issue for us.
This regression was a subtle one - not apparent from reading the source. I'm wondering if it would be possible to catch such cases in an automated way...
Activity
spring-projects-issues commentedon Dec 3, 2018
Zhang Jie commented
spring-orm-5.1.3 uses
hibernate-core-5.3.7.Finalas dependency, you shouldn't use Hibernate 5.1.x in the classpath.spring-projects-issues commentedon Dec 3, 2018
Juergen Hoeller commented
We aim to support any Hibernate ORM 5.x version at runtime, so this is nevertheless a bug... even if we generally recommend Hibernate ORM 5.3.7.
spring-projects-issues commentedon Dec 3, 2018
Juergen Hoeller commented
This seems to be caused by the
sessionImpl::connectionmethod reference, wheresessionImplis aSessionImplementortype but theconnection()method is inherited fromSharedSessionContractImplementorsince Hibernate ORM 5.2 there.Taras Tielkes, have you seen this as a recent regression in Spring Framework 5.1.x? Does it work with Spring Framework 5.0.x still?
As far as I can see, a simple change to
() -> sessionImpl.connection()solves the problem at bytecode level since it compiles to aSessionImplementorreference again. Assuming it still works with Spring Framework 5.0.x (where a similar direct call in in place), that's the change I intend to apply for the 5.1.4 release.spring-projects-issues commentedon Dec 3, 2018
Taras Tielkes commented
Juergen Hoeller, for this project we're just now migrating from 4.3.x to 5.1.x, so I don't have any feedback for 5.0.x versions.
However, I'd be happy to check later this evening.
spring-projects-issues commentedon Dec 3, 2018
Juergen Hoeller commented
No worries, I'll commit the change to master assuming that it solves the problem, so please rather try
5.1.4.BUILD-SNAPSHOTtonight.spring-projects-issues commentedon Dec 4, 2018
Taras Tielkes commented
Juergen Hoeller I have tried the SNAPSHOT from last night, and I can confirm that it fixes the issue for us.
This regression was a subtle one - not apparent from reading the source. I'm wondering if it would be possible to catch such cases in an automated way...
As always, thanks for the quick service.