So, I had a successful Spring 4.2.2.RELEASE MVC web-app working with Hibernate 4.3.8.Final. I changed to Hibernate 5.0.2.Final, and I made the following changes to my spring application context file.
From:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
To:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
And from:
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
To:
<bean id="transactionManager"
class="org.springframework.orm.hibernate5.HibernateTransactionManager">
I can't find this issue anywhere else on the net. I know for sure that I checked my classpath and there is no other Hibernate4 reference anywhere in this application on any level.
When I try to execute my DaoTestCode, the Spring application context will not load because of this error message:
java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debug
I have tried to find other places on the net where it shows the proper configuration for Hibernate 5 with Spring 4.2.2, and I can't find anything. I know I went through some pain going from Hibernate 3 to Hibernate 4, and now I want to migrate up accordingly. I knew there would be some pain points. Is there any way to solve this issue, and any other future issues I should be aware of?
Thanks!