java.lang.IllegalStateException: Session/EntityManager is closed

Hot problem!
This exception has a lot of traffic. You can help 12 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Антон Шадрин
, 3 months ago
Session/EntityManager is closed
via Stack Overflow by 555oriol
, 8 months ago
Session/EntityManager is closed
via Hibernate JIRA by Jones, 7 months ago
Session/EntityManager is closed
java.lang.IllegalStateException: Session/EntityManager is closed
at org.hibernate.internal.AbstractSharedSessionContract.checkOpen(AbstractSharedSessionContract.java:328)
at org.hibernate.engine.spi.SharedSessionContractImplementor.checkOpen(SharedSessionContractImplementor.java:126)
at org.hibernate.internal.SessionImpl.getContextEntityIdentifier(SessionImpl.java:1653)
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:271)

Users with the same issue

Once, 5 months ago
Once, 5 months ago
6 times, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.