LazyInitializationException « Map « JPA Q&A





1. LazyInitializationException using only entity-name mappings    forum.hibernate.org

org.hibernate.LazyInitializationException: illegal access to loading collection at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:363) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentSet.hashCode(PersistentSet.java:434) at java.util.HashMap$Entry.hashCode(Unknown Source) at java.util.AbstractMap.hashCode(Unknown Source) at java.util.HashMap$Entry.hashCode(Unknown Source) at java.util.AbstractMap.hashCode(Unknown Source) at java.util.HashMap.put(Unknown Source) at java.util.HashSet.add(Unknown Source) at ...

2. LazyInitializationException despite lazy=false mapping    forum.hibernate.org

We have just converted a POJO used in a Many-to-one relationship from xDoclet-based mappings to Annotations (this is the first item of many we will convert) and get a LazyInitializationException accessing the POJO. This is not a collection of pojos, so we are surprised it is lazily loaded at all. Also, the parent class (test.Item) has the property default-lazy="false" set on ...

3. LazyInitializationException despite lazy=false mapping    forum.hibernate.org

We have just converted a POJO used in a Many-to-one relationship from xDoclet-based mappings to Annotations (this is the first item of many we will convert) and get a LazyInitializationException accessing the POJO. This is not a collection of pojos, so we are surprised it is lazily loaded at all. Also, the parent class (test.Item) has the property default-lazy="false" set on ...