Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Jul 4, 2016 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jul 4, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants