Using spring version:4.3.1,Spring data:1.10.2,hibernate core: 5.2.1. using postgres Database pg connector version :9.4.1208.jre7 After upgrading from hibernate 5.1.0 to 5.2.
This looks as a Jar conflict for Spring Framework 4.3.0.RELEASE version which you have chosen. Please downgrade it to hibernate-core-5.1.0.Final.jar.
I found that the class ConfigurationHelper which implements the method
public static getFlushMode( Object value )
in hibernate-entitymanager-5.0.2.Final.jar in package org.hibernate.jpa.internal.util conflicts with the correct method signature which includes the default value that is implemented in hibernate-core-5.2.12.Final.jar.
The wrong implementation was resolved. I removed the dependency hibernate-entitymanager-5.0.2.Final.jar from my gradle.build file which already includes the dependency hibernate-core-5.2.12.Final.jar and that sorted out the method not found exception
This looks odd as the method signature support for the Hibernate 5.2 API was added in Spring Framework 4.3.0.RELEASE where it specifically looks for getHibernateFlushMode
first and is then followed up by getFlushMode
.
I'd say chances are you likely have the new Hibernate libraries on your classpath but you may have an older version of Spring Framework in the classpath which isn't compatible.