[opencms-dev] Problem in cron scheduled job for search lucene

maria.freixes_graells at alcatel.es maria.freixes_graells at alcatel.es
Wed Jul 19 11:58:50 CEST 2006


Hello Jon,

I'll try the question later, because now I'm busy with the 
"searchtest5.html" example from Alkacon
Thanks for all,
Maria

Jonathan Woods wrote:
> Maria - 
>
> Would you post your navigation.jsp as an attachment to a message?  That
> would make it easier to debug.
>
> Jon 
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of
> maria.freixes_graells at alcatel.es
> Sent: 18 July 2006 17:49
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] Problem in cron scheduled job for search lucene
>
> Thanks Joachim!!
> But I've tryied your option, but the error is the same.
> Take a look at:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 2 in the jsp file:
> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.aww/elem
> ents/navigation.jsp
> Generated servlet error:
> Syntax error, insert ";" to complete Statement
>
>
> 	at
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
> r.java:84)
> 	at
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
> 28)
> 	at
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
> 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
> 	at
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
> 63)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 03)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> java:672)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> er.java:574)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> .java:499)
> 	at
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDisp
> atcher.java:194)
> 	at
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
> ava:170)
> 	at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
> 	at
> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRe
> questDispatcher.java:423)
> 	at
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
> ava:174)
> 	at
> org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:467)
> 	at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:412)
> 	at
> org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:7
> 19)
> 	at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1332)
> 	at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:178)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> )
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> )
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :107)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
> onnection(Http11BaseProtocol.java:664)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
> rkerThread.java:80)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> 	at java.lang.Thread.run(Thread.java:595)
>
>
>
> Joachim Zittmayr escribió:
>   
>> hola!
>> hi maria!
>> i think the problem is thr ArrayList. try the following line
>>
>>      ArrayList navItems = new
>>      ArrayList(navigation.getNavigationForFolder());
>>
>> instead of this one
>>
>>      ArrayList navItems = navigation.getNavigationForFolder();
>>
>> hope this helps!
>> best regards!
>> joachim
>>
>> On Tue, 18 Jul 2006 17:07:40 +0200, maria.freixes_graells at alcatel.es
>> said:
>>   
>>     
>>> Hello Jonathan,
>>>
>>> Thanks for your answer. All contributes are welcomed.
>>> But my problem is very strange:
>>> 1.- If I put While in lower case, I've more errors plus to ";" one.
>>> 2.- The code of the navigation.jsp file:
>>>
>>> I had error in the first line, so, I've implemented the second "<%" 
>>> alone, as you can see now, and the error is appearing at this line. 
>>> Also, I've more errors if I put "<%="....
>>>
>>>
>>> org.apache.jasper.JasperException: Unable to compile class for JSP An 
>>> error occurred at line: 2 in the jsp file:
>>> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.a
>>> ww/elements/navigation.jsp Generated servlet error: Syntax error, 
>>> insert ")" to complete MethodInvocation An error occurred at line: 2 
>>> in the jsp file:
>>> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.a
>>> ww/elements/navigation.jsp Generated servlet error: Syntax error, 
>>> insert ";" to complete Statement An error occurred at line: 2 in the 
>>> jsp file:
>>> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.a
>>> ww/elements/navigation.jsp Generated servlet error: Syntax error, 
>>> insert ";" to complete Statement An error occurred at line: 2 in the 
>>> jsp file:
>>> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.a
>>> ww/elements/navigation.jsp Generated servlet error: Syntax error on 
>>> token ")", delete this token
>>>
>>>
>>>
>>> <%@ page session="false" import="org.opencms.file.*, 
>>> org.opencms.jsp.*, java.util.*, org.opencms.frontend.templateone.*" 
>>> %>
>>> *<%*
>>> CmsJspActionElement cms = new CmsJspActionElement( pageContext, 
>>> request, response ); CmsJspNavBuilder navigation = 
>>> cms.getNavigation(); ArrayList navItems = 
>>> navigation.getNavigationForFolder();
>>> Iterator i = navItems.iterator();
>>> While( i.hasNext() ) {
>>> CmsJspNavElement navElement = ( CmsJspNavElement )i.next(); String 
>>> link = cms.link( navElement.getResourceName() ); String title = 
>>> navElement.getTitle(); out.println("<a href=\"" + link + "\">" + 
>>> title + "</a><br/>"); } %>
>>>
>>>
>>> Jonathan Woods escribió:
>>>     
>>>       
>>>> Maria -
>>>>
>>>> 1.  I notice you have "   While (...)  " - maybe it's just how you
>>>>         
> pasted
>   
>>>> the code, but of course the 'while' keyword should start with a lower
>>>>         
> case.
>   
>>>> 2.  Whenever I get a JSP compilation error like this, it's usually 
>>>> for one of two reasons:
>>>>
>>>> (i) I have used <% ... %> without closing a Java source code line with a
>>>>         
> ";"
>   
>>>> (the ";" is not necessary if you're using <%= ... %> to evaluate an 
>>>> expression, but it is with <% ... %>.
>>>>
>>>> (ii) I have made an error in back-slash quoting a character like ", 
>>>> and Java is interpreting it as starting or ending a String literal.
>>>>
>>>> Jon
>>>>
>>>> -----Original Message-----
>>>> From: opencms-dev-bounces at opencms.org 
>>>> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of 
>>>> maria.freixes_graells at alcatel.es
>>>> Sent: 18 July 2006 13:55
>>>> To: The OpenCms mailing list
>>>> Subject: Re: [opencms-dev] Problem in cron scheduled job for search 
>>>> lucene
>>>>
>>>> Hello Roberto!!
>>>>
>>>> I've already tryied to implement a search engine following the 
>>>> alkacon documentation integrated with OpenCms, but I've also problems on
>>>>         
> it.
>   
>>>> Let me explain to you:
>>>>
>>>> 1) I've the navigation.jsp  in
>>>> /system/modules/es.alcatelbarcelonadesigncenter.aww/elements/
>>>>
>>>> <%@ page session="false"
>>>> import="org.opencms.file.*, org.opencms.jsp.*, java.util.*, 
>>>> org.opencms.frontend.templateone.*"
>>>> %>
>>>> <%
>>>> /*
>>>> * Provides basic site navigation.
>>>> */
>>>> // Instead of using the default constructor and init(), we // can 
>>>> use this
>>>> constructor:
>>>> CmsJspActionElement cms =
>>>> new CmsJspActionElement( pageContext, request, response ); // Get 
>>>> navigation info CmsJspNavBuilder navigation = cms.getNavigation(); 
>>>> ArrayList navItems = navigation.getNavigationForFolder();
>>>> Iterator i = navItems.iterator();
>>>> // Loop through all of the items in the ArrayList and print the // menu.
>>>> While( i.hasNext() ) {
>>>> CmsJspNavElement navElement = ( CmsJspNavElement )i.next(); String 
>>>> link = cms.link( navElement.getResourceName() ); String title = 
>>>> navElement.getTitle(); out.println("<a href=\"" + link + "\">" + 
>>>> title + "</a><br/>"); } %>
>>>>
>>>>
>>>> 2) I've included the file into our welcome template
>>>> (/system/modules/es.alcatelbarcelonadesigncenter.aww/templates/)
>>>>
>>>>
>>>> <%@ page session="false" %><%--
>>>> --%><%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" 
>>>> %><%
>>>>
>>>> // init
>>>>
>>>> %><cms:template element="head"><%--
>>>> --%><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
>>>> <html> <head> <title>OpenCms - <cms:property name="Title" 
>>>> escapeHtml="true" /></title>
>>>>
>>>> <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; 
>>>> CHARSET=<cms:property name="content-encoding" default="ISO-8859-1" 
>>>> />"> <meta name="author" content="Alkacon Software GmbH"> <meta 
>>>> name="description" content="<cms:property name="Description"
>>>> default="OpenCms welcome page and release notes" />"> <meta 
>>>> name="keywords" content="<cms:property name="Keywords"
>>>> default="OpenCms, Demo, Application, Content Management" />">
>>>>
>>>> <style type="text/css">
>>>> <!--
>>>> <%@ include file="../resources/welcome.css" %>
>>>> -->
>>>> </style>
>>>>
>>>> <cms:editable />
>>>>
>>>> </head>
>>>> <body>
>>>> <img src="<cms:link>../resources/logo_opencms_large.png</cms:link>" 
>>>> alt="OpenCms Logo" title="OpenCms Logo" width="250" height="63" 
>>>> border="0" align="right">
>>>>
>>>> <!-- Navigation starts here -->
>>>> <cms:include file="../elements/navigation.jsp" />
>>>> <!-- cms:include
>>>> file="/system/modules/net.grcomputing.opencms.search.lucene/elements
>>>> /simple_
>>>> search.jsp"/>
>>>> <!-- Navigation ends here -->
>>>> <br clear="all">
>>>>
>>>> <!-- Main page body starts here -->
>>>> </cms:template>
>>>>
>>>> <cms:template element="body">
>>>> <table>
>>>> <tr>
>>>>     <td>
>>>>         <cms:include element="body" editable="true" />
>>>>     </td>
>>>> </tr>
>>>> </table>
>>>> </cms:template><%--
>>>>
>>>>
>>>> --%><cms:template element="foot"><%--
>>>> --%><!-- Main page body ends here -->
>>>>
>>>> <!-- Login element starts here --><%-- --%><cms:include 
>>>> file="../elements/login_element.jsp" /><%--
>>>> --%><!-- Login element ends here -->
>>>>
>>>> <p class="small"><img
>>>> src="<cms:link>../resources/logo_alkacon.gif</cms:link>" 
>>>> alt="Alkacon Software GmbH" width="100" height="36" border="0" 
>>>> align="left"> © 2006 Alkacon Software GmbH<br> The OpenCms 
>>>> experts<br> <a href="http://www.alkacon.com"
>>>> target="alkacon">http://www.alkacon.com</a></p>
>>>>
>>>> </body>
>>>> </html>
>>>> </cms:template>
>>>>
>>>>
>>>> But now, I've a problem with the welcome page, it says:
>>>>
>>>>
>>>> javax.servlet.ServletException: javax.servlet.jsp.JspException: 
>>>> Unable to compile class for JSP
>>>>
>>>> An error occurred at line: 4 in the jsp file:
>>>> /WEB-INF/jsp/offline/system/modules/es.alcatelbarcelonadesigncenter.
>>>> aww/elem
>>>> ents/navigation.jsp
>>>> Generated servlet error:
>>>> Syntax error, insert ";" to complete Statement
>>>>
>>>>
>>>> 	at
>>>> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(Page
>>>> ContextI
>>>> mpl.java:854)
>>>> 	at
>>>> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCo
>>>> ntextImp
>>>> l.java:791)
>>>> 	at
>>>> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.es_alcatelbarc
>>>> elonades
>>>> igncenter_aww.welcome_html_jsp._jspService(welcome_html_jsp.java:168)
>>>> 	at
>>>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>> 	at
>>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe
>>>> r.java:3
>>>> 32)
>>>> 	at
>>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>>>> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
>>>> lication
>>>> FilterChain.java:252)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
>>>> FilterCh
>>>> ain.java:173)
>>>> 	at
>>>>
>>>>         
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
>   
>>>> java:672)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationDispatcher.doInclude(Application
>>>> Dispatch
>>>> er.java:574)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDi
>>>> spatcher
>>>> .java:499)
>>>> 	at
>>>> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexReq
>>>> uestDisp
>>>> atcher.java:194)
>>>> 	at
>>>> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDisp
>>>> atcher.j
>>>> ava:170)
>>>> 	at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
>>>> 	at
>>>> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(C
>>>> msFlexRe
>>>> questDispatcher.java:423)
>>>> 	at
>>>> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDisp
>>>> atcher.j
>>>> ava:174)
>>>> 	at
>>>> org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:467)
>>>> 	at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:412)
>>>> 	at
>>>> org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManage
>>>> r.java:7
>>>> 19)
>>>> 	at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1332)
>>>> 	at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
>>>> lication
>>>> FilterChain.java:252)
>>>> 	at
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
>>>> FilterCh
>>>> ain.java:173)
>>>> 	at
>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
>>>> Valve.ja
>>>> va:213)
>>>> 	at
>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContext
>>>> Valve.ja
>>>> va:178)
>>>> 	at
>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
>>>> java:126
>>>> )
>>>> 	at
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
>>>> java:105
>>>> )
>>>> 	at
>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
>>>> lve.java
>>>> :107)
>>>> 	at
>>>>
>>>>         
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>   
>>>> 	at
>>>>
>>>>         
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>   
>>>> 	at
>>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.
>>>> processC
>>>> onnection(Http11BaseProtocol.java:664)
>>>> 	at
>>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndp
>>>> oint.jav
>>>> a:527)
>>>> 	at
>>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFo
>>>> llowerWo
>>>> rkerThread.java:80)
>>>> 	at
>>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
>>>> Pool.jav
>>>> a:684)
>>>>
>>>> I don't know about this ";"
>>>>
>>>> Could you help me please since this point?
>>>>
>>>> I would be very gratefully.
>>>>
>>>> Thanks and regards,
>>>>
>>>> Maria
>>>> 	at java.lang.Thread.run(Thread.java:595)
>>>>
>>>>
>>>>
>>>>
>>>> Roberto Hervella Macía escribió:
>>>>   
>>>>       
>>>>         
>>>>> Hi Mr Alireza,
>>>>>
>>>>> I've been implementing some search indexes in OpenCms lately, and 
>>>>> I'm
>>>>>     
>>>>>         
>>>>>           
>>>> using
>>>>   
>>>>       
>>>>         
>>>>> them in some jsps that I've implemented similar to OpenCms examples.
>>>>> You can see these examples in alkacon documentation integrated with
>>>>>     
>>>>>         
>>>>>           
>>>> OpenCms,
>>>>   
>>>>       
>>>>         
>>>>> in the folder examples search.
>>>>>
>>>>> I hope this information could help you.
>>>>>
>>>>>     Roberto
>>>>>
>>>>>
>>>>> ----- Original Message -----
>>>>> From: <maria.freixes_graells at alcatel.es>
>>>>> To: <opencms-dev at opencms.org>
>>>>> Sent: Tuesday, July 18, 2006 12:11 PM
>>>>> Subject: [opencms-dev] Problem in cron scheduled job for search 
>>>>> lucene
>>>>>
>>>>>
>>>>>   
>>>>>     
>>>>>         
>>>>>           
>>>>>> Hello everybody!!
>>>>>>
>>>>>> Could anyone help to me, please?
>>>>>> I'm trying to use the lucene search engine. I've followed the 
>>>>>> instructions related in the OpenCms ebook but I've optained an 
>>>>>> error when I'm trying to create the scheduled job, when I put the 
>>>>>> Java class in the combo: 
>>>>>> net.grcomputing.opencms.search.lucene.CronIndexManager,
>>>>>> then I optain the error: com/opencms/core/I_CmsCronJob, and the 
>>>>>> combo is setting to red colour.
>>>>>>
>>>>>> Any idea about it?
>>>>>> Can I use the lucene search engine without using the scheduled job?
>>>>>>
>>>>>> Thanks a lot, and have a nice day!!
>>>>>>
>>>>>> Best regards,
>>>>>> Maria
>>>>>>
>>>>>> _______________________________________________
>>>>>> This mail is sent to you from the opencms-dev mailing list To 
>>>>>> change your list options, or to unsubscribe from the list, please
>>>>>>       
>>>>>>           
>>>>>>             
>>>> visit
>>>>   
>>>>       
>>>>         
>>>>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>>>
>>>>>>     
>>>>>>       
>>>>>>           
>>>>>>             
>>>>> _______________________________________________
>>>>> This mail is sent to you from the opencms-dev mailing list To 
>>>>> change your list options, or to unsubscribe from the list, please 
>>>>> visit http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>>   
>>>>>     
>>>>>         
>>>>>           
>>>> _______________________________________________
>>>> This mail is sent to you from the opencms-dev mailing list To change 
>>>> your list options, or to unsubscribe from the list, please visit 
>>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>   
>>>>       
>>>>         
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>   


More information about the opencms-dev mailing list