My Java Web application uses Hibernate to perform ORM. In some of my objects, I use lazy loading to avoid getting data until I absolutely need it. The problem is that I load the initial object in a session, and then that session is destroyed. When I later attempt to resolve the lazy-loaded collections in my object I get the following error:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: common.model.impl.User.groups, no session or session was closed
I tried associating a new session with the collection and then resolving, but this gives the same results.
Does anyone know how I can resolve the lazy collections once the original session is gone?
Thanks...
--Steve