You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hans-Heinrich Braun <ha...@yahoo.de> on 2015/03/27 15:01:38 UTC
cocoon ProgessService and Hibernate
I am using cocoon 3.0 with Hibernate.To enable Lazy Loading I insert in web.xml <filter> <filter-name>lazyLoadingFilter</filter-name> <filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class> <init-param><param-name>filter-class</param-name><param-value>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</param-value></init-param></filter> <filter-mapping> <filter-name>lazyLoadingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>Which is Ok with a normal RestController.But with ProgressService I get still the error
org.hibernate.LazyInitializationException: could not initialize proxy - no Session when I use Lazy Loading
Best regardsHeiner
Re: cocoon ProgessService and Hibernate
Posted by Thorsten Scherler <th...@apache.org>.
On 27/03/15 15:01, Hans-Heinrich Braun wrote:
>
> ------------------------------------------------------------------------
> *I am using cocoon 3.0 with Hibernate.*
> *To enable Lazy Loading I insert in web.xml*
> *
> <filter>
> <filter-name>lazyLoadingFilter</filter-name>
> <filter-class>org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter</filter-class>
> <init-param>
> <param-name>filter-class</param-name>
> <param-value>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</param-value>
> </init-param>
> </filter>
> <filter-mapping>
> <filter-name>lazyLoadingFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> *
> *Which is Ok with a normal RestController.*
> *But with ProgressService I get still the error*
> *
> *
> *
> org.hibernate.LazyInitializationException: could not initialize proxy
> - no Session
> when I use Lazy Loading
> *
How did you configure the session?
salu2
> *
>
> Best regards
> Heiner
> *
>
--
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/