Looking at your log I can instantly tell that your transaction settings are wrongly set. That’s because there’s no TransactionInterceptor
call in your stack trace.
The TransactionInterceptor
is called by your Spring Service proxies when your web controllers call the actual Service methods.
-
Make sure you use the Spring hibernate4 classes:
org.springframework.orm.hibernate4.HibernateTransactionManager
-
Don’t override
@Transactional
methods, but use a template patterns instead. -
Try using
JPATransactionManager
instead so you can inject the currentEntityManager
with the@PersistenceContext
annotation instead. This is much more elegant than callingsessionFactory.getCurrentSession()
in every DAO method.