I was using Servlets, PostgreSQL and Hibernate with EntityManager to build a Web app and everything was working ok until I moved the project to a Maven based project. Now I\
ok... this was just an error on the persistance unit xml configuration, I removed transaction-type="JTA" from the persistence-unit tag. It seems that it was added automatically by the IDE.
Just add the property to your persistence.xml
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>
Add @Transactional
to your DAO and the class accessing your DAO class.
Refer: http://spring.io/guides/gs/managing-transactions/