Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7A5B1840E for ; Fri, 24 Apr 2015 21:06:03 +0000 (UTC) Received: (qmail 93085 invoked by uid 500); 24 Apr 2015 21:06:03 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 93012 invoked by uid 500); 24 Apr 2015 21:06:03 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 93002 invoked by uid 99); 24 Apr 2015 21:06:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 21:06:03 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.164.171.186 which is an MX secondary for users@cocoon.apache.org) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 21:05:57 +0000 Received: from mo4-p05-ob.smtp.rzone.de (mo4-p05-ob.smtp.rzone.de [81.169.146.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id D267F43CCF for ; Fri, 24 Apr 2015 21:05:36 +0000 (UTC) X-RZG-AUTH: :I3wBe1Onbu02NkHlDbrpfe8kNG+qAh4Y0eq1FQR3dyEi7cXgY6D3LUmJU7csV6Ng+PM= X-RZG-CLASS-ID: mo05 Received: from [192.168.0.11] (84-72-47-217.dclient.hispeed.ch [84.72.47.217]) by smtp.strato.de (RZmta 37.5 DYNA|AUTH) with ESMTPSA id x06b42r3OL5TyGy (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Fri, 24 Apr 2015 23:05:29 +0200 (CEST) Message-ID: <553AB018.1050406@apache.org> Date: Fri, 24 Apr 2015 23:05:28 +0200 From: Thorsten Scherler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: cocoon ProgessService and Hibernate References: <1616093126.4128088.1427464898748.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <1616093126.4128088.1427464898748.JavaMail.yahoo@mail.yahoo.com> Content-Type: multipart/alternative; boundary="------------000703080905010109010203" X-Virus-Checked: Checked by ClamAV on apache.org --------------000703080905010109010203 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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* > * > > lazyLoadingFilter > org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter > > filter-class > org.springframework.orm.hibernate4.support.OpenSessionInViewFilter > > > > lazyLoadingFilter > /* > > * > *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 codeBusters S.L. - web based systems http://www.codebusters.es/ --------------000703080905010109010203 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
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/
--------------000703080905010109010203--