I am gettin below error. I am using Spring 3.2.2 and Hibernate 4. How can I create a new HibernateTemplate object?
java.lang.ClassCastException: org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate3.SessionHolder
I think this line gives error;
HibernateTemplate ht = new HibernateTemplate(sessionFactory);
Change your code from org.springframework.orm.hibernate3.HibernateTemplate to org.springframework.orm.hibernate4.HibernateTemplate in your DAO implementation class imported packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With