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
Spring 4.3.2 HibernateTemplate#findByNamedQuery isn't compatible with Hibernate 5.0 [SPR-14676] #19240
java.lang.NoSuchMethodError: org.hibernate.Session.getNamedQuery(Ljava/lang/String;)Lorg/hibernate/query/Query;
at org.springframework.orm.hibernate5.HibernateTemplate$32.doInHibernate(HibernateTemplate.java:958)
at org.springframework.orm.hibernate5.HibernateTemplate$32.doInHibernate(HibernateTemplate.java:954)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:356)
at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:323)
at org.springframework.orm.hibernate5.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:954)
at example.HibernateTemplateBugTest.testFindByNamedQuery(HibernateTemplateBugTest.java:28)
in the attached reproduction test when run with simply
mvn clean test
If however, you override the standard Hibernate version to 5.2.2 then the test succeeds by running
From the looks of things, it just needs a similar fix to 19e5a34 to be applied to the findByNamedQuery, findByNamedQueryAndNamedParam, and findByNamedQueryAndValueBean methods as well?
Activity
spring-projects-issues commentedon Sep 7, 2016
Steve Storey commented
From the looks of things, it just needs a similar fix to 19e5a34 to be applied to the findByNamedQuery, findByNamedQueryAndNamedParam, and findByNamedQueryAndValueBean methods as well?
spring-projects-issues commentedon Sep 9, 2016
Juergen Hoeller commented
Good catch! Fixed in master now, to be backported to 4.3.3 early next week.
spring-projects-issues commentedon Sep 15, 2016
Juergen Hoeller commented
It would be great if you could give the latest
4.3.3.BUILD-SNAPSHOTa try...