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
Compatibility problems with Hibernate 4.3.0.Beta1 and newer [SPR-10839] #15465
In Hibernate release 4.3.0.Beta1, released in April 2013, a couple of classes were moved from the org.hibernate.service.* packages to org.hibernate.engine.* packages. Spring ORM uses a couple of these relocated hibernate classes, but has not anticipated the package renaming introduced in Hibernate 4.3.0.Beta1. It concerns esp. org.hibernate.service.jta.platform.spi.JtaPlatform (used in org.springframework.orm.hibernate4.SpringSessionContext) and org.hibernate.service.jdbc.connections.spi.ConnectionProvider (used in org.springframework.orm.hibernate4.SessionFactoryUtils). As a result, you cannot use the latest Hibernate 4.3.x versions with Spring in many scenario's.
In our use case, we run Axis2 web services in Tomcat, where older web services use plain Hibernate while for new web services, we want to use JPA 2.1 (which is supported in hibernate as of release 4.3.0). It is not possible to share the same version of spring / hibernate for these different web services due to this issue.
Fixed for Spring Framework 4.0 RC1, reflectively adapting to the different package locations in Hibernate 4.0-4.2 vs 4.3, preserving compatibility with all 4.x versions that way. Frankly, it's a pain that we have to do this, in particular since Hibernate relocated so many things between 3.6 and 4.0 already.
Note that you'll have to upgrade to Spring 4 for this level of support. Generally speaking, all EE 7 level specifications and their corresponding providers will only be supported in Spring 4: including JPA 2.1 and Bean Validation 1.1, while preserving compatibility with JPA 2.0 and BV 1.0.
Following some recent email discussions, I'd like to summarize the state of affairs here:
Spring Framework 3.2.3+ fully supports Hibernate 4.0 to 4.2.x in its orm.hibernate4 package.
Spring Framework 4.0.1+ fully supports Hibernate 4.0 to 4.3.x in its orm.hibernate4 package.
We strongly recommend an upgrade to Spring Framework 4.0.x along with your upgrade to Hibernate 4.3.x; otherwise, please keep using Hibernate 4.2.x for the time being. Note that Spring Framework 4.0 went GA ahead of Hibernate 4.3's GA and is a very straightforward upgrade from the Spring Framework 3.2.x line.
If you'd like to (or have to) stick with Hibernate 4.2 for the time being, e.g. because you're running on a JPA 2.0 based server, then the entire Spring Framework 4.x line will still be there to support you. However, we do not recommend the use of Hibernate 4.0.x or 4.1.x; we strongly suggest either the latest Hibernate 4.2.x or 4.3.x release with Spring 4.
Activity
spring-projects-issues commentedon Aug 16, 2013
Dave Schoorl commented
Instructions for a do-it-yourself-fix can be found here: http://stackoverflow.com/a/18255242
spring-projects-issues commentedon Sep 3, 2013
Juergen Hoeller commented
Fixed for Spring Framework 4.0 RC1, reflectively adapting to the different package locations in Hibernate 4.0-4.2 vs 4.3, preserving compatibility with all 4.x versions that way. Frankly, it's a pain that we have to do this, in particular since Hibernate relocated so many things between 3.6 and 4.0 already.
Note that you'll have to upgrade to Spring 4 for this level of support. Generally speaking, all EE 7 level specifications and their corresponding providers will only be supported in Spring 4: including JPA 2.1 and Bean Validation 1.1, while preserving compatibility with JPA 2.0 and BV 1.0.
Juergen
spring-projects-issues commentedon Apr 14, 2014
Juergen Hoeller commented
Following some recent email discussions, I'd like to summarize the state of affairs here:
We strongly recommend an upgrade to Spring Framework 4.0.x along with your upgrade to Hibernate 4.3.x; otherwise, please keep using Hibernate 4.2.x for the time being. Note that Spring Framework 4.0 went GA ahead of Hibernate 4.3's GA and is a very straightforward upgrade from the Spring Framework 3.2.x line.
If you'd like to (or have to) stick with Hibernate 4.2 for the time being, e.g. because you're running on a JPA 2.0 based server, then the entire Spring Framework 4.x line will still be there to support you. However, we do not recommend the use of Hibernate 4.0.x or 4.1.x; we strongly suggest either the latest Hibernate 4.2.x or 4.3.x release with Spring 4.
Juergen
spring-projects-issues commentedon May 15, 2018
Rushikesh Sawant commented
For spring 4.3.16 upgrade, can we use 4.2.7 hibernate-core, entity?
also as per spring 4.3.16 documentation, hibernate-validator minimum remains 4.3. Currently its 4.1.0.Final. would that be ok?