After i update to spring4/hibernate4. i got above exception.
Turns out that i need to add
to my rest controller so that when the service/dao calls getCurrentSession(), spring could start the transaction and opens session from its own transaction management thru AOP.
If you encountered this when running unit test, it is possible that you forget to add @Transaction annotation to the Junit test class or method.