Hi,
I'm runnig Hibernate 3.1 in a JSF Framework on Tomcat5.5.
Got 2 lazy loaded collections: containedPropertiesA, containedPropertiesB (Both have identical mappings)
My Problem is that after successfully fetching containedPropertiesA I want to fetch containedPropertiesB with the same session. While doing so hibernate crashes with:
Code:
ERROR [http-8880-Processor24] - failed to lazily initialize a collection of role: foo.bar.containedPropertiesB, no session or session was closed (LazyInitializationException.java:19)
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: foo.bar.containedPropertiesB, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentSet.toString(PersistentSet.java:253)
The thing I'm currently racking my brains on is, that at the point when hibernate calls the proxy for containedPropertiesB my Debuger tells me there is still a session that could be used für lazy loading.
Thanks for any help! If you need more information, just point out what you need.