java.lang.IllegalStateException: Only session beans with bean-managed transactions can obtain UserTransaction

Stack Overflow | Tirath | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Save @Entity using @EntityManager not working

    Stack Overflow | 7 months ago | Tirath
    java.lang.IllegalStateException: Only session beans with bean-managed transactions can obtain UserTransaction

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Only session beans with bean-managed transactions can obtain UserTransaction

      at com.sun.ejb.containers.EJBContainerTransactionManager.getUserTransaction()
    2. Embedded GlassFish Web
      AbstractSessionContextImpl.getUserTransaction
      1. com.sun.ejb.containers.EJBContainerTransactionManager.getUserTransaction(EJBContainerTransactionManager.java:566)
      2. com.sun.ejb.containers.BaseContainer.getUserTransaction(BaseContainer.java:995)
      3. com.sun.ejb.containers.AbstractSessionContextImpl.getUserTransaction(AbstractSessionContextImpl.java:120)
      3 frames