org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.XXX.collection, could not initialize proxy - no Session

GitHub | janeklb | 3 months ago
  1. 0

    Spring's OpenSessionInViewInterceptor doesn't seem to be working when run under hotswap agent

    GitHub | 3 months ago | janeklb
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.XXX.collection, could not initialize proxy - no Session
  2. 0

    Spring Data JPA - "could not initialize proxy - no Session" - With Methods marked as transactional

    Stack Overflow | 8 months ago | douglaslee1990
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.models.PlanDetail.brochureSections, could not initialize proxy - no Session
  3. 0

    I need advice on using @JsonIgnore

    Stack Overflow | 2 years ago | Jannis Alexakis
    org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    LazyInitializationException: failed to lazily initialize a collection of role could not initialize proxy - no Session

    Stack Overflow | 2 years ago | svjn
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.wpt.models.Item.itemCategory, could not initialize proxy - no Session
  6. 0

    Initializing through both context-param and init-param

    Stack Overflow | 2 years ago | svjn
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.wpt.models.Item.itemCategory, could not initialize proxy - no Session

  1. serious2monkeys 26 times, last 2 months ago
  2. MoYapro 3 times, last 3 weeks ago
  3. linxiaolong 8 times, last 4 months ago
  4. tfr 1 times, last 5 months ago
  5. treanz 4 times, last 5 months ago
1 more registered users
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.LazyInitializationException

    failed to lazily initialize a collection of role: com.XXX.collection, could not initialize proxy - no Session

    at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException()
  2. Hibernate
    PersistentBag.iterator
    1. org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:575)
    2. org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:214)
    3. org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554)
    4. org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142)
    5. org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:294)
    5 frames
  3. Java RT
    Iterable.forEach
    1. java.lang.Iterable.forEach(Iterable.java:74)
    1 frame