4 Replies Latest reply: May 2, 2012 10:05 AM by Dmitry Geraskov RSS

    Hibernate tool - HQL query fails with LazyInitializationException

    Stephanie Smith Newbie

      I am using the hibernate eclipse plugin. I have the session and connection information defined (and mappings).

      When I issue the HQL query, I always get a LazyInitializationException.

       

       

      2012-05-01 11:30:21,149 ERROR main org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: com.mypackage.HibProcess.subprocesses, no session or session was closed

      org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.mypackage..HibProcess.subprocesses,

      no session or session was closed

      Any ideas how i can avoid this?

      I am using similar configuration/properties that I used previously without error (but was a different database).


      Thanks