Skip to content

HibernateTemplate not binary-compatible with Hibernate 5.0/5.1's Query type [SPR-14425] #18996

Closed

Description

@spring-projects-issues

Stéphane Nicoll opened SPR-14425 and commented

Hibernate 5.2 has deprecated org.hibernate.Query in favour of org.hibernate.query.Query. Unfortunately the Session is returning the new type.

In HibernateTemplate#bulkUpdate we have an explicit check on org.hibernate.Query that leads to:

java.lang.NoSuchMethodError: org.hibernate.Session.createQuery(Ljava/lang/String;)Lorg/hibernate/query/Query;
        at org.springframework.orm.hibernate5.HibernateTemplate$38.doInHibernate(HibernateTemplate.java:1103)
        at org.springframework.orm.hibernate5.HibernateTemplate$38.doInHibernate(HibernateTemplate.java:1099)
        at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:340)
        at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:307)
        at org.springframework.orm.hibernate5.HibernateTemplate.bulkUpdate(HibernateTemplate.java:1099)

Affects: 4.3.1

Issue Links:

Referenced from: commits 16d5ba9, 19e5a34

1 votes, 5 watchers

Activity

  1. added
    type: bug
    in: data
    on Jan 11, 2019
  2. added this to the 4.3.2 milestone 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: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions