[solved] DAO unit test breaks with org.hibernate.HibernateException: No Session found for current thread

I’m writing a unit test for my spring DAO, which includes both write and read test cases. Here is the exception that broke the test execution.

org.hibernate.HibernateException: No Session found for current thread

Any such operations needs @Transactional annotations.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top