]
Gail Badner resolved HHH-5421.
------------------------------
Resolution: Duplicate
Assignee: Gail Badner
Accessing collection on PostLoad event causes
LazyInitializationException
-------------------------------------------------------------------------
Key: HHH-5421
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5421
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.3
Environment: Hibernate-3.5.3-Final
Oracle 11g
Reporter: Stu White
Assignee: Gail Badner
Attachments: hibernate-test.zip
We've encountered a problem using the PostLoad event to access a OneToMany
Collection.
Attempting to access the Collection in the PostLoad event handler results in a
LazyInitializationException being thrown by AbstractEntityManagerImpl. The stack trace is
below:
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)
I've attached a JUnit test case containing the classes and configuration. We're
using Oracle 11g and Hibernate v3.5.3-Final, but the test case uses HSQLDB.
If there is any further information I can provide to help diagnose this then please let
me know.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: