javax.persistence.PersistenceException

org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed

Samebug tips1

Check your annotations to use the proper table and column names.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2339

  • org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed
  • org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed
  • org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed
  • Stack trace

    • javax.persistence.PersistenceException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:631) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:585)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    6 times, 1 month ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 1 year ago
    11 more bugmates