Code:
Caused by: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:166)
I'm in the process of migrating to 3.2.x and have encountered a strange LIE when walking the object graph.
I re-attach object A.
openSession.lock(a, LockMode.NONE);
I iterate through A's children of type B.
from there, I walk a chain of 3 many-to-one relationships: C, D, E.
(Note: all have no lazy attribute defined.)
Any invokation on E, will throw the LIE.
C & D's proxies seem to be fine, but E is hosed. This same code has been working for years on Hibernate 2.x and I did not find any migration note that would suggest that I cannot walk my hibernate graph as I used to.
Any help is
much appreciated.