我正在运行Karaf,在persistence.xml中有一个DataSource (指向SQL Server DB),并且我正在尝试执行insert查询。
但是我得到了一个例外:
javax.persistence.TransactionRequiredException: Executing an update/delete query at
org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:71)我的事务类型设置为JTA。我想我需要配置一些事务,但我对此不是很熟悉。我认为这很简单,但我在谷歌上找不到太多的想法。
我需要在我的XML描述符(persistence.xml或blueprints.xml)中更改什么?
请提供一些示例XML片段。在此之前,非常感谢您。
71 | Active | 80 | 2.3.0 | Apache Aries JPA Container API
73 | Active | 80 | 2.3.0 | Apache Aries JPA container
74 | Active | 80 | 2.3.0 | Apache Aries JPA support
76 | Active | 80 | 1.1.1 | Apache Aries Transaction Blueprint
77 | Active | 80 | 2.1.0 | Apache Aries Transaction Blueprint
78 | Active | 80 | 1.3.0 | Apache Aries Transaction Managerhttps://stackoverflow.com/questions/41505190
复制相似问题