Skip to content

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

Closed
@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions