0 Replies Latest reply on Sep 12, 2017 6:33 PM by Daniel Benetti

    WFLYEJB0447: Transaction was already rolled back

    Daniel Benetti Newbie

      Hi, I work with a very old software (about 15 years), and it si being updated in it's technology in baby steps.

      It's old technology like struts 1, apache axis and others.

      We was using Java 1.6.0_45 and JBoss 5.1GA and we've some exceptions like this one that we solved by changing xa-datasrouce to non-xa-datasource in the oracle-ds.xml file (even in cluster environments).

      So, now we migrate to java 1.8.0_131 using wildfly-10.1.0.Final and the error returned.

      I checked the datasources (we have 2, one for the ORM and other for quartz Jobs) and both are not using XA.

      Seems to only happen in transactions of the Quartz and not every time, the software now is running without errors, but suddenly the error occurs again.

      Seems to be a timeout problem with the transaction.

      We've some EJB that have atomic transactions.

      Below are the log message, the datasources from standalone.xml and the quartz.properties of the software.

      Could someone help me with this problem?

       

       

      LOG MESSAGE

      2017-09-11 00:01:02,043 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012108: CheckedAction::check - atomic action 0:ffffac1a0bcc:551952af:59b5b086:148c aborting with 1 threads active!

      2017-09-11 00:01:02,043 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffffac1a0bcc:551952af:59b5b086:148c

      2017-09-11 00:01:06,731 WARN  [com.arjuna.ats.arjuna] (MyScheduler_Worker-12) ARJUNA012077: Abort called on already aborted atomic action 0:ffffac1a0bcc:551952af:59b5b086:148c

      2017-09-11 00:01:06,732 ERROR [org.jboss.as.ejb3.invocation] (MyScheduler_Worker-12) WFLYEJB0034: EJB Invocation failed on component GerenciadorNFeEjb for method public abstract java.util.List br.com.synchro.dfe.ejb.GerenciadorNFeEjb.recuperaNFesEnviadaDpecEpec(java.lang.String,java.lang.String,java.lang.String) throws java.rmi.RemoteException,br.com.synchro.SynException: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:137)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:117)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:279)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:344)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:241)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:44)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:75)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)

          at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)

          at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)

          at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:266)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:184)

          at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocation(EJBObjectInterceptor.java:58)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocation(EJBHomeInterceptor.java:83)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:42)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:138)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)

          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)

          at com.sun.proxy.$Proxy130.recuperaNFesEnviadaDpecEpec(Unknown Source)

          at br.com.synchro.dfe.ejb.EnviaLoteEjbBean.enviarNFeTransmitidosDpecEpec(EnviaLoteEjbBean.java:116)

          at sun.reflect.GeneratedMethodAccessor441.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:498)

          at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)

          at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)

          at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)

          at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)

          at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)

          at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

          at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:44)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:75)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)

          at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)

          at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)

          at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)

          at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:266)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:184)

          at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocation(EJBObjectInterceptor.java:58)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocation(EJBHomeInterceptor.java:83)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:42)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:138)

          at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

          at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)

          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)

          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)

          at com.sun.proxy.$Proxy143.enviarNFeTransmitidosDpecEpec(Unknown Source)

          at br.com.synchro.dfe.service.impl.RecoverDFeService.enviarNFesTransmitidasDpecEpec(RecoverDFeService.java:725)

          at br.com.synchro.dfe.service.impl.RecoverDFeService.recoverLotesContingencia(RecoverDFeService.java:700)

          at br.com.synchro.dfe.job.RecoveryJob.executaRecoverDFe(RecoveryJob.java:233)

          at br.com.synchro.dfe.job.RecoveryJob.execute(RecoveryJob.java:152)

          at org.quartz.core.JobRunShell.run(JobRunShell.java:206)

          at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)

      Caused by: javax.transaction.RollbackException: WFLYEJB0447: Transaction 'TransactionImple < ac, BasicAction: 0:ffffac1a0bcc:551952af:59b5b086:148c status: ActionStatus.ABORTED >' was already rolled back

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:98)

          ... 138 more

       

      STANDALONE-FULL.XML

       

      <subsystem xmlns="urn:jboss:domain:datasources:4.0">
      <datasources>
      <datasource jta="false" jndi-name="java:/jdbc/NFE_DS" pool-name="NFE_DS" enabled="true" use-ccm="false">
      <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
      <driver-class>oracle.jdbc.OracleDriver</driver-class>
      <driver>oracle</driver>
      <pool>
      <min-pool-size>20</min-pool-size>
      <max-pool-size>50</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      <security>
      <user-name>DFE_LOCAL</user-name>
      <password>DFE_LOCAL</password>
      </security>
      <validation>
      <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
      <validate-on-match>true</validate-on-match>
      <background-validation>true</background-validation>
      <background-validation-millis>300000</background-validation-millis>
      </validation>
      <timeout>
      <idle-timeout-minutes>300</idle-timeout-minutes>
      </timeout>
      <statement>
      <share-prepared-statements>false</share-prepared-statements>
      </statement>
      </datasource>
      <datasource jta="false" jndi-name="java:/jdbc/NFE_DS_QRTZ" pool-name="NFE_DS_QRTZ" enabled="true" use-ccm="false">
      <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
      <driver-class>oracle.jdbc.OracleDriver</driver-class>
      <driver>oracle</driver>
      <pool>
      <min-pool-size>20</min-pool-size>
      <max-pool-size>50</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      <security>
      <user-name>DFE_LOCAL</user-name>
      <password>DFE_LOCAL</password>
      </security>
      <validation>
      <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
      <validate-on-match>true</validate-on-match>
      <background-validation>true</background-validation>
      <background-validation-millis>300000</background-validation-millis>
      </validation>
      <timeout>
      <idle-timeout-minutes>300</idle-timeout-minutes>
      </timeout>
      <statement>
      <share-prepared-statements>false</share-prepared-statements>
      </statement>
      </datasource>
      <drivers>
      <driver name="oracle" module="com.oracle">
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      </driver>
      </drivers>
      </datasources>
      </subsystem>
      
      

       

       

      QUARTZ. PROPERTIES

      #Main Configurations

      org.quartz.scheduler.instanceName=MyScheduler
      org.quartz.scheduler.instanceId=AUTO

      #Thread Pool Configurations
      org.quartz.threadPool.threadCount=100

      #Job Store Configurations
      org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
      org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
      org.quartz.jobStore.tablePrefix=QRTZ_
      org.quartz.jobStore.isClustered=false

      #Data Source Configurations
      org.quartz.dataSource.DFE_DS_QRTZ.jndiURL=java:/jdbc/NFE_DS_QRTZ
      org.quartz.jobStore.dataSource=DFE_DS_QRTZ

      org.quartz.dataSource.DFE_DS_JOB_QRTZ.jndiURL=java:/jdbc/NFE_DS_QRTZ
      org.quartz.jobStore.nonManagedTXDataSource=DFE_DS_JOB_QRTZ
      org.quartz.jobStore.clusterCheckinInterval=60000

      #Scheduler Configurations
      org.quartz.scheduler.skipUpdateCheck=true
      org.quartz.jobStore.selectWithLockSQL=SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE