I'm currently setting up a project with Spring and Hibernate. After several other problems i got the next problem :P
Anyway. When call entityManager.flush()
I get an exception: javax.persistence.TransactionRequiredException: no transaction is in progress
.
I have annotated my class with @Transactional
but it's still not working.
I read serval threads here where people had a similar problem, but the solution was always <tx:annotation-driven transaction-manager="transactionManager" />
. But I already have this configuration.
I am not sure what code or files I should provide you, so you can find the whole project here: https://drive.google.com/file/d/0B7Exc4dHICl-UDN3ZEJnbS1FZFk/edit?usp=sharing
Thank you in advance.