Note that there are some explanatory texts on larger screens.

plurals
  1. POTransactionRequiredException with WeblogicJtaTransactionManager
    primarykey
    data
    text
    <p>I am trying to work with distributed transactions in my application. For this purpose I have configured WeblogicJtaTransactionManager (provided by spring)to manage my distributed transaction. But its seems transactions are not starting. While running update query the get the following exception :</p> <pre><code> Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException: Executing an update/delete query </code></pre> <p>My application context :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.jasypt.org/schema/encryption http://www.jasypt.org/schema/encryption/jasypt-spring31-encryption-1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"&gt; &lt;!-- &lt;tx:jta-transaction-manager /&gt; --&gt; &lt;tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/&gt; &lt;context:component-scan base-package="com.myapp"&gt; &lt;context:exclude-filter type="regex" expression="com.myapp.controllers"/&gt; &lt;/context:component-scan&gt; &lt;jee:jndi-lookup jndi-name="jdbc/myDataSource" id="dataSource"/&gt; &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt; &lt;property name="jtaDataSource" ref="dataSource" /&gt; &lt;property name="jpaVendorAdapter"&gt; &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /&gt; &lt;/property&gt; &lt;property name="jpaDialect"&gt; &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /&gt; &lt;/property&gt; &lt;property name="packagesToScan" value="com.myapp.domain" /&gt; &lt;property name="jpaProperties"&gt; &lt;props&gt; &lt;prop key="javax.persistence.sharedCache.mode"&gt;NONE&lt;/prop&gt; &lt;prop key="hibernate.dialect"&gt;${app.db.dailect}&lt;/prop&gt; &lt;prop key="initialSize"&gt;${app.db.minpoolsize}&lt;/prop&gt; &lt;prop key="maxActive"&gt;${app.db.maxpoolsize}&lt;/prop&gt; &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt; &lt;prop key="hibernate.max_fetch_depth"&gt;0&lt;/prop&gt; &lt;prop key="hibernate.query.substitutions"&gt;true=1, false=0&lt;/prop&gt; &lt;prop key="hibernate.generate_statistics"&gt;false&lt;/prop&gt; &lt;prop key="javax.persistence.query.timeout"&gt;600000&lt;/prop&gt; &lt;prop key="hibernate.transaction.factory_class"&gt;org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory&lt;/prop&gt; &lt;prop key="hibernate.transaction.jta.platform"&gt;org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; &lt;!-- &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt; &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt; &lt;property name="jpaDialect"&gt; &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /&gt; &lt;/property&gt; &lt;/bean&gt; --&gt; &lt;bean id="transactionManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" &gt; &lt;property name="transactionManagerName" value="javax.transaction.TransactionManager"/&gt; &lt;/bean&gt; &lt;jpa:repositories base-package="com.myapp.repos" factory-class="com.myapp.repos.BaseRepositoryFactoryBean" entity-manager-factory-ref="entityManagerFactory"/&gt; </code></pre> <p></p> <p>Any help is appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload