java.lang.IllegalStateException: Session/EntityManager is closed

tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Karaf 4.0.6 Transactional method closes at exit EntityManager so UserTransaction at upper level fails to commit

    Stack Overflow | 8 months ago | Dmitry Lukasevich
    java.lang.IllegalStateException: Session/EntityManager is closed

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Session/EntityManager is closed

      at org.hibernate.internal.AbstractSharedSessionContract.checkOpen()
    2. Hibernate
      EntityType.getIdentifier
      1. org.hibernate.internal.AbstractSharedSessionContract.checkOpen(AbstractSharedSessionContract.java:328)[87:org.hibernate.core:5.2.2.Final]
      2. org.hibernate.engine.spi.SharedSessionContractImplementor.checkOpen(SharedSessionContractImplementor.java:126)[87:org.hibernate.core:5.2.2.Final]
      3. org.hibernate.internal.SessionImpl.getContextEntityIdentifier(SessionImpl.java:1653)[87:org.hibernate.core:5.2.2.Final]
      4. org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:271)[87:org.hibernate.core:5.2.2.Final]
      5. org.hibernate.type.EntityType.getIdentifier(EntityType.java:462)[87:org.hibernate.core:5.2.2.Final]
      5 frames