"TransactionRequiredException: no transaction is in progress" during flush of application managed entity manager in JBoss EAP

Solution Verified - Updated -

Issue

  • An application managed entity manager is created.
  • A JTA transaction is initiated (e.g. during a CMT or BMT context)
  • During EntityManager.flush() an exception is raised

    ... javax.persistence.TransactionRequiredException: no transaction is in progress
    
  • No exception occurred in Hibernate 5.1 / EAP 7.1.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.2
    • 7.3
  • Hibernate
    • 5.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content