[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5421) Accessing collection on PostLoad event causes LazyInitializationException
Stu White (JIRA)
noreply at atlassian.com
Wed Jul 28 05:51:39 EDT 2010
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
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.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list