You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Sparkes <pe...@didm.co.uk> on 2015/03/16 20:37:22 UTC
cocoon-2.1.12 - lucene indexer - cinclude
Hi,
I have a lucene application base on "samples/blocks/querybean"
All worked fine for a long time, but now the cinclude in
<!-- the lucene indexer -->
<map:match pattern="screen/indexer">
<map:generate type="jx" src="screens/lucene-indexer.xml"/>
<map:transform type="cinclude"/>
for new file result in for example:
<lucene:document url="2947"> </lucene:document>
instead of for the older files
<lucene:document url="4696">
<lodge lodge="west farm" web="true">
etc
</lodge>
</lucene:document>
Please,Any ideas why the " cinclude" is not properly including the new file
Peter
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/
cocoon ProgessService and Hibernate
Posted by Hans-Heinrich Braun <ha...@yahoo.de>.
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-2.1.12 - lucene indexer - cinclude
Posted by Peter Sparkes <pe...@didm.co.uk>.
Hi Jos,
The files to include come from in the sitemap
<map:parameter name="content-directory"
value="/usr/share/tomcat7/instances/wolseylodges/webapps/ROOT/B&B/xml"/>
<map:parameter name="include-pattern" value=".xml$"/>
<!-- create the index from the contents of a collection -->
<map:match pattern="create.html">
<map:call function="indexCollection">
<map:parameter name=" value="screen/indexer"/>
<map:parameter name="lucene-directory" value="{global:lucene-directory}"/>
<map:parameter name="lucene-analyzer" value="{global:lucene-analyzer}"/>
<map:parameter name="lucene-merge-factor" value="10"/>
<map:parameter name="lucene-create-index" value="false"/>
<map:parameter name="lucene-content" value="cocoon:/prepare4indexing/"/>
<map:parameter name="content-directory"
value="/usr/share/tomcat7/instances/wolseylodges/webapps/ROOT/B&B/xml"/>
<map:parameter name="include-pattern" value=".xml$"/>
<map:parameter name="result-directory" value=""/>
<map:parameter name="result-suffix" value=""/>
</map:call>
</map:match>
If I make a change to a file that is correctly included and then search for it in a Lucene search
the correct file is found, so all appears to be working correctly except for the Cinclude of new files
Cheers
Peter
On 17/03/2015 08:04, Jos Snellings wrote:
> Hi Peter,
>
> What file do you want to include? (I see no src attribute?)
>
> Cheers,
> Jos
>
> On Mon, Mar 16, 2015 at 8:37 PM, Peter Sparkes <peter@didm.co.uk <ma...@didm.co.uk>> wrote:
>
> Hi,
>
> I have a lucene application base on "samples/blocks/querybean"
>
> All worked fine for a long time, but now the cinclude in
>
> <!-- the lucene indexer -->
> <map:match pattern="screen/indexer">
> <map:generate type="jx" src="screens/lucene-indexer.xml"/>
> <map:transform type="cinclude"/>
>
> for new file result in for example:
> <lucene:document url="2947"> </lucene:document>
>
> instead of for the older files
>
> <lucene:document url="4696">
> <lodge lodge="west farm" web="true">
> etc
> </lodge>
> </lucene:document>
>
> Please,Any ideas why the " cinclude" is not properly including the new file
>
> Peter
>
>
>
>
>
> --
> Confucius said way too much ...
>
Re: cocoon-2.1.12 - lucene indexer - cinclude
Posted by Jos Snellings <jo...@upperware.biz>.
Hi Peter,
What file do you want to include? (I see no src attribute?)
Cheers,
Jos
On Mon, Mar 16, 2015 at 8:37 PM, Peter Sparkes <pe...@didm.co.uk> wrote:
> Hi,
>
> I have a lucene application base on "samples/blocks/querybean"
>
> All worked fine for a long time, but now the cinclude in
>
> <!-- the lucene indexer -->
> <map:match pattern="screen/indexer">
> <map:generate type="jx" src="screens/lucene-indexer.xml"/>
> <map:transform type="cinclude"/>
>
> for new file result in for example:
> <lucene:document url="2947"> </lucene:document>
>
> instead of for the older files
>
> <lucene:document url="4696">
> <lodge lodge="west farm" web="true">
> etc
> </lodge>
> </lucene:document>
>
> Please,Any ideas why the " cinclude" is not properly including the
> new file
>
> Peter
>
>
>
--
Confucius said way too much ...