Hi, I'm having a problem with lazy instantiation when using a template engine (WebMacro). I'm getting sometimes the error
Code:
16:17:08,939 ERROR LazyInitializationException:19 - could not initialize proxy - the owning Session was closed
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:53)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:134)
at ejb.catalog.Autore$$EnhancerByCGLIB$$1390b281.getNome(<generated>)
at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.webmacro.engine.PropertyOperator.invoke(PropertyOperatorCache.java:864)
at org.webmacro.engine.UnaryMethodAccessor.get(PropertyOperatorCache.java:1230)
at org.webmacro.engine.PropertyOperator.getProperty(PropertyOperatorCache.java:651)
at org.webmacro.engine.PropertyOperatorCache.getProperty(PropertyOperatorCache.java:142)
at org.webmacro.Context.internalGet(Context.java:387)
at org.webmacro.Context.getProperty(Context.java:439)
...
I'm using
Hibernate 3 final and I've configured it to bind the session factory to JNDI. I use a filter to close the session after the last servlet complete the execution.
Where should I look for hints on this problem ?
TIA[/code]