If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.

Use the proper ORM annotations (@ManyToOne and @OneToMany).


Use eager fetch (fetch = FetchType.EAGER) annotation.

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

  • 質問の編集履歴 - QA@IT
    via by Unknown author,
  • Strange lazy loading exception
    via Stack Overflow by Mariusz Grodek
    • org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: entity.Order.orderLine, could not initialize proxy - no Session at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException( at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded( at org.hibernate.collection.internal.AbstractPersistentCollection.readSize( at org.hibernate.collection.internal.PersistentBag.size( at javax.faces.model.ListDataModel.isRowAvailable( at javax.faces.model.ListDataModel.setRowIndex(

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    132 times, last one,
    5 times, last one,
    1 times, last one,
    1 times, last one,
    38 more bugmates