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
NoSuchMethodError for SessionFactoryImplementor.getProperties() with Hibernate 5.1 [SPR-14365] #18937
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)
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.
Activity
spring-projects-issues commentedon Jun 15, 2016
Juergen Hoeller commented
We're reflectively obtaining the
getPropertieshandle now, avoiding binary compatibility issues.rajvpitian commentedon Jan 17, 2023
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.
bclozel commentedon Jan 17, 2023
@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.
rajvpitian commentedon Jan 18, 2023
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.