"WFTXN0001: A transaction is already in progress" failure for JBeret batch after transaction timeout in JBoss EAP

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • JBeret 1.2

Issue

  • Following a transaction timeout, chunks fail with the error below

    ... JBERET000007: Failed to run job ..., org.jberet.job.model.Chunk...: javax.transaction.NotSupportedException: WFTXN0001: A transaction is already in progress
        at org.wildfly.transaction.client.ContextTransactionManager.begin(ContextTransactionManager.java:60)
        at org.wildfly.transaction.client.ContextTransactionManager.begin(ContextTransactionManager.java:54)
        at org.jberet.runtime.runner.ChunkRunner.readProcessWriteItems(ChunkRunner.java:318)
        at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:202)
        at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:226)
        at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:147)
        at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)
        at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)
        at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60)
        at org.wildfly.extension.batch.jberet.deployment.BatchEnvironmentService$WildFlyBatchEnvironment$1.run(BatchEnvironmentService.java:184)
        at org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:497)
        at org.jberet.spi.JobExecutor$3.run(JobExecutor.java:161)
        at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        at org.jboss.threads.JBossThread.run(JBossThread.java:320)
    

Resolution

This issue1 is resolved in This content is not included.EAP 7.1 cumulative patch (CP) 6 and later releases. Production systems should use the latest available cumulative patch.

Root Cause

This is a known defect (Content from issues.jboss.org is not included.JBERET-459).

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.