[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 14:55:27 CEST 2006
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/elements/navigation.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.es_alcatelbarcelonadesigncenter_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:332)
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)
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
>
More information about the opencms-dev
mailing list