Skip to content

Compatibility problems with Hibernate 4.3.0.Beta1 and newer [SPR-10839] #15465

Closed

Description

@spring-projects-issues

Dave Schoorl opened SPR-10839 and commented

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.


Affects: 3.2.4, 4.0 M2

Issue Links:

0 votes, 6 watchers

Activity

  1. spring-projects-issues commented on Aug 16, 2013

    @spring-projects-issues
    CollaboratorAuthor
  2. spring-projects-issues commented on Sep 3, 2013

    @spring-projects-issues
    CollaboratorAuthor

    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

  3. spring-projects-issues commented on Apr 14, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    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.

    Juergen

  4. spring-projects-issues commented on May 15, 2018

    @spring-projects-issues
    CollaboratorAuthor

    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?

  5. added
    in: data
    type: enhancement
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datatype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions