Andy Wilkinson opened SPR-14365 and commented
The signature of SessionFactoryImplementor.getProperties()
changed in 5.2 to return Map
rather than Properties
. This leads to a NoSuchMethodError
with 5.1 (and 5.0 too, I presume):
java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map;
at org.springframework.orm.hibernate5.SessionFactoryUtils.getDataSource(SessionFactoryUtils.java:153)
at org.springframework.orm.hibernate5.HibernateTransactionManager.afterPropertiesSet(HibernateTransactionManager.java:353)
at org.springframework.orm.hibernate5.HibernateTransactionManager.<init>(HibernateTransactionManager.java:145)
Affects: 4.3 GA
Issue Links: - #18899 Support for Hibernate ORM 5.2 - #18996 HibernateTemplate not binary-compatible with Hibernate 5.0/5.1's Query type - SWF-1685 HibernateFlowExecutionListener is incompatible with Hibernate 5
1 votes, 8 watchers
Comment From: spring-projects-issues
Juergen Hoeller commented
We're reflectively obtaining the getProperties
handle now, avoiding binary compatibility issues.
Comment From: rajvpitian
Juergen Hoeller commented
We're reflectively obtaining the
getProperties
handle now, avoiding binary compatibility issues.
Hello Juergen, Could you please mention what do you mean by reflectively obtaining 'getProperties' here? I do have the same issue when migrating to 4+ to 5.6+. I am using ANT project and hence cannot resolve dependencies through Maven and gradle. It would be great if you give any reference to fix this issue.
Comment From: bclozel
@rajvpitian this issue is now probably outdated as we've released two major versions of Spring Framework in the meantime and upgraded to Hibernate 6.0. In our Hibernate 5.x support, you'll see a reflection call that probably comes from this issue.
Comment From: rajvpitian
@rajvpitian this issue is now probably outdated as we've released two major versions of Spring Framework in the meantime and upgraded to Hibernate 6.0. In our Hibernate 5.x support, you'll see a reflection call that probably comes from this issue.
Hi @bclozel, we have to stick to 5.6 version as we have a legacy application. I am facing this while upgrading from hibernate 4.1.