samedi 28 mars 2015

Spring JDBC throws java.lang.NoSuchMethodError: org.hibernate.Session.connection()Ljava/sql/Connection;

My problem is same as this one - java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session


I get the following exception while using Spring JDBCTemplate.



java.lang.NoSuchMethodError: org.hibernate.Session.connection()Ljava/sql/Connection;


The accepted answer in the link above, recommends downgrading Hibernate to a version supported by Spring.


This is not acceptable to me as I need the latest version of Hibernate to use its new features (and also benefit from bug fixes).


Is there a way to get it to work without downgrading hibernate?


Aucun commentaire:

Enregistrer un commentaire