Skip to content
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

NoSuchMethodError for SessionFactoryImplementor.getProperties() with Hibernate 5.1 [SPR-14365] #18937

Closed
spring-projects-issues opened this issue Jun 15, 2016 · 4 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 Jun 15, 2016

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:

1 votes, 8 watchers

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

We're reflectively obtaining the getProperties handle now, avoiding binary compatibility issues.

@rajvpitian
Copy link

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.

@bclozel
Copy link
Member

bclozel commented 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
Copy link

@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.

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

4 participants