[opencms-dev] Problem in cron scheduled job for search lucene
maria.freixes_graells at alcatel.es
maria.freixes_graells at alcatel.es
Tue Jul 18 18:48:42 CEST 2006
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/elements/navigation.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
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:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
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(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:170)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java: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:719)
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(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: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.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java: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.aww/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.aww/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.aww/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.aww/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(PageContextI
>>> mpl.java:854)
>>> at
>>> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
>>> l.java:791)
>>> at
>>> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.es_alcatelbarcelonades
>>> 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(JspServletWrapper.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(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)
>>>
>>> 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
>>>
>>>
More information about the opencms-dev
mailing list