Hibernate: Unable to access TransactionManager or UserTransaction to make physical transaction delegate

一个人想着一个人 提交于 2019-11-30 13:52:33

Just add the property to your persistence.xml

<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>

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.

Add @Transactional to your DAO and the class accessing your DAO class.

Refer: http://spring.io/guides/gs/managing-transactions/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!