"joinTransaction has been called on a resource-local EntityManager" when using EclipseLink in JBoss EAP

Solution Verified - Updated -

Issue

  • EclipseLink failure when calling joinTransaction() from business logic
... javax.persistence.TransactionRequiredException: joinTransaction has been called on a resource-local EntityManager which is unable to register for a JTA transaction.
    at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper.registerIfRequired(EntityTransactionWrapper.java:91)
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:2081)
    ...

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • EclipseLink (as JPA provider)

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