Could not initialize proxy - No Session again

Posted by Iapilgrim on Stack Overflow See other posts from Stack Overflow or by Iapilgrim
Published on 2010-03-18T12:17:20Z Indexed on 2012/09/21 21:40 UTC
Read the original article Hit count: 273

I get these error log when viewing a page

ERROR [TP-Processor11] (LazyInitializationException.java:42) - could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
    at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:132)
    at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:174)
    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
    at org.osmoz.contents.model.enm.ContentType_$$_javassist_71.getDefaultShortMode(ContentType_$$_javassist_71.java)
    at org.osmoz.contents.web.tapestry.components.EnmContentZone.getTemplate(EnmContentZone.java:67)
    at org.osmoz.contents.web.tapestry.base.AbstractRawContentZone.getContent(AbstractRawContentZone.java:67)
    at $PropertyConduit_1276091af82.get($PropertyConduit_1276091af82.java)
    at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:58)
    at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
    at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:496)
    at org.apache.tapestry5.corelib.components.OutputRaw._$read_parameter_value(OutputRaw.java)
    at org.apache.tapestry5.corelib.components.OutputRaw.beginRender(OutputRaw.java:43)
    at org.apache.tapestry5.corelib.components.OutputRaw.beginRender(OutputRaw.java)
    at

I know the problem is Session has been closed. But I really don't know why this error occur not so often that why I don't know the root cause is.

Enviroment:

Tapestry5, JPA, Hibernate 3.3.2.GA

I've set

<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>

in web.xml also

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about lazy-initialization