JBoss5.1 JTA TransactionInProgress
alkeshredhat Jul 1, 2019 5:56 AMWe are trying to deploy EAR from WebSphere to JBoss5.1
Getting following exception during call to session bean.
2019-06-27 04:52:58,920 DEBUG [com.arjuna.ats.jta.logging.logger] (TRADE_SU#BPS) XAOnePhaseResource.commit(< 131075, 29, 27, 4945455351101505599501005810210150525853100495110299555658494856455351101505599501005810210150525853100495110299555658494952 >) could not commit local tx; - nested throwable: (org.jboss.resource.JBossResourceException: Could not commit LocalTransaction; - nested throwable: (javax.jms.TransactionInProgressException: Cannot call commit on an XA session))
Because of this exception, Transaction gets rolledback & commit does not happens. I have verified that code is not throwing any exception during execution as, Same code works when called out side of EJB.
2019-06-27 17:29:24,502 ERROR [org.jboss.ejb.plugins.LogInterceptor] (TRADE_SU#BPS) TransactionRolledbackException in method: public abstract java.math.BigDecimal com.xxx.workflow.api.IOWClientManager.registerAndIntroduceWorkItem(com.xxx.workflow.entity.WorkitemObject,java.lang.String,boolean) throws com.xxx.workflow.api.OWException,com.xxx.workflow.api.OWFatalException,java.rmi.RemoteException, causedBy:
javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Could not commit transaction.
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commit(TransactionImple.java:257)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:501)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:361)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
at org.jboss.ejb.Container.invoke(Container.java:1029)
at sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
at com.sun.proxy.$Proxy695.registerAndIntroduceWorkItem(Unknown Source)
at com.xxx.workflow.api.WorkflowClient.registerAndIntroduceWorkItem(WorkflowClient.java:140)
at com.xxx.workflow.OrbiWorkflowAccessor.insertWorkItem(OrbiWorkflowAccessor.java:380)
at com.xxx.processing.registration.Register.register(Register.java:121)
Oracle-DS.xml
<local-tx-datasource>
<jndi-name>bPool</jndi-name>
<use-java-context>false</use-java-context>
<isSameRM-override-value>false</isSameRM-override-value>
<connection-url>jdbc:oracle:thin:@xxxxx:1521:xxxx</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>xxxx</user-name>
<password>xxx</password>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<maxReconnects>100</maxReconnects>
<initialTimeout>5000</initialTimeout>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
Jboss.xml
<session>
<ejb-name>OWClient</ejb-name>
<jndi-name>OWClient</jndi-name>
</session>
ejb-xml.jar
<session id="Session_15">
<description>xxClient</description>
<display-name>xxClient</display-name>
<ejb-name>OWClient</ejb-name>
<home>xxxxxInterfaceHome</home>
<remote>xxxxxInterfaceRemote</remote>
<ejb-class>xxxxOW_Client</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref id="EJBLocalRef_1559051344584">
<ejb-ref-name>localEngineRoutingManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>xxxER_Manager_InterfaceHome</local-home>
<local>xxxER_Manager_InterfaceLocal</local>
<ejb-link>ERManager</ejb-link>
</ejb-local-ref>
<ejb-local-ref id="EJBLocalRef_1559051344585">
<ejb-ref-name>ASManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>ASManager_Home</local-home>
<local>ASManager_Local</local>
<ejb-link>ASManager</ejb-link>
</ejb-local-ref>
</session>
...
<container-transaction id="MethodTransaction_15">
<method id="MethodElement_15">
<ejb-name>OWClient</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>