<html>
<body>
Hi All,<br><br>
I just added the lucene module, but I can't seem to get it to work. I
modified the "registry.xml below and I also included the error msg
from the log. I have included the scheduled task entry, registry.xml and
the error log.<br><br>
Hope someone can tell me what is the problem with my configuration.
Thanks a lot<br><br>
Cheers,<br>
kelvin<br><br>
<b><u>Scheduled task entry<br>
</u></b>06 16 * * * admin Administrators
net.grcomputing.opencms.search.lucene.CronIndexManager
createIndex=true<br><br>
<br>
<b><u>registry.xml<br>
</u></b><?xml version="1.0"
encoding="ISO-8859-1"?><br>
<registry><br>
<system><br>
- <luceneSearch><br>
- <!-- <br>
<x-tab> </x-tab> -
mergeFactor and permCheck are currently ignored.<br>
<x-tab> </x-tab>
<br><br>
--> <br>
<mergeFactor>100000</mergeFactor> <br>
<permCheck>true</permCheck> <br>
- <!-- <br>
<x-tab> </x-tab> -
directory in which lucene will store its indexes. Note: this is
real<br>
<x-tab> </x-tab> -
fs, not VFS.<br>
<x-tab> </x-tab>
<br><br>
--> <br>
<indexDir>C:\luceneindex</indexDir> <br>
- <!-- <indexDir>F:\luceneindex\</indexDir> <br>
--> <br>
- <!-- <br>
<x-tab> </x-tab> -
The analyzer is used for parsing documents. Choose one for your <br>
<x-tab> </x-tab> -
language. If language is English, use the StandardAnalyzer.<br>
<x-tab> </x-tab> -
There are additional analyzers at
<a href="http://jakarta.apache.org/lucene" eudora="autourl">http://jakarta.apache.org/lucene<br>
</a><x-tab> </x-tab>
<br><br>
--> <br>
<analyzer>org.apache.lucene.analysis.standard.StandardAnalyzer</analyzer>
<br>
- <!--
<analyzer>org.apache.lucene.analysis.de.GermanAnalyzer</analyzer>
<br>
--> <br>
- <!-- <br>
<x-tab> </x-tab> -
If subsearch is true, subfolders will be searched by default.<br>
<x-tab> </x-tab> -
This can be turned on/off per directory.<br>
<x-tab> </x-tab>
<br><br>
--> <br>
<subsearch>true</subsearch> <br>
- <!-- <br>
<x-tab> </x-tab> -
Name of the project to index. Online is recommended.<br>
<x-tab> </x-tab>
<br><br>
--> <br>
<project>online</project> <br>
- <!-- <br>
<x-tab> </x-tab> -
docFactories determine how documents are processed. Generally, one<br>
<x-tab> </x-tab> -
docFactory exists for each type of content (viz. JSP, Page, Plain) <br>
<x-tab> </x-tab> -
that you want to index.<br>
<x-tab> </x-tab>
<br><br>
--> <br>
- <docFactories><br>
- <!-- <br>
<x-tab> </x-tab>
- This docFactory indexes documents with type page (e.g. HTML <br>
<x-tab> </x-tab><x-tab> </x-tab>
- files edited with the WYSIWYG editor). <br>
<x-tab> </x-tab> <br><br>
--> <br>
- <docFactory enabled="true" type="page"><br>
<class>net.grcomputing.opencms.search.lucene.PageDocument</class> <br>
</docFactory><br>
- <!-- <br>
<x-tab> </x-tab> - This docFactory is a little more complex. It takes documents of<br>
<x-tab> </x-tab><x-tab> </x-tab> - type "plain" and determines, by extension, what class should be<br>
<x-tab> </x-tab><x-tab> </x-tab> - used to index each particular file. In this example, we want to<br>
<x-tab> </x-tab><x-tab> </x-tab> - index plain text files exactly as they are, but any files that <br>
<x-tab> </x-tab><x-tab> </x-tab> - contain tags need the tags stripped out before they are indexed.<br>
<x-tab> </x-tab><x-tab> </x-tab> -<br>
<x-tab> </x-tab><x-tab> </x-tab> - Note that the name="" attribute is simply for pretty output, and <br>
<x-tab> </x-tab><x-tab> </x-tab> - can contain any allowable PCDATA text.<br>
<x-tab> </x-tab><x-tab> </x-tab> <br><br>
--> <br>
- <docFactory enabled="true" type="plain"><br>
- <fileType name="plaintext"><br>
<extension>.txt</extension> <br>
<class>net.grcomputing.opencms.search.lucene.PlainDocument</class> <br>
</fileType><br>
- <fileType name="taggedtext"><br>
<extension>.html</extension> <br>
<extension>.htm</extension> <br>
<extension>.xml</extension> <br>
- <!-- This will strip tags before processing <br>
--> <br>
<class>net.grcomputing.opencms.search.lucene.TaggedPlainDocument</class> <br>
</fileType><br>
</docFactory><br>
- <!-- <br>
<x-tab> </x-tab> - This will strip JSP tags and all scriptlets. IT WILL NOT RENDER THE<br>
<x-tab> </x-tab><x-tab> </x-tab> - JSP FIRST, as JSPs are, by nature, dynamic.<br>
<x-tab> </x-tab><x-tab> </x-tab> -<br>
<x-tab> </x-tab><x-tab> </x-tab> - Usually, this is off by default.<br>
<x-tab> </x-tab><x-tab> </x-tab> <br><br>
--> <br>
- <docFactory enabled="false" type="jsp"><br>
<class>net.grcomputing.opencms.search.lucene.JspDocument</class> <br>
</docFactory><br>
- <!-- For the news module. Enable if you use news <br>
--> <br>
- <docFactory enabled="false" type="news"><br>
<class>net.grcomputing.opencms.search.lucene.NewsDocument</class> <br>
</docFactory><br>
- <!-- For the forum module. Enable if you use forums. <br>
--> <br>
- <docFactory enabled="false" type="forum"><br>
<class>de.wfnetz.opencms.modules.forum.ContributionDocument</class> <br>
</docFactory><br>
- <!-- If you need to index XML Template files (bad idea) use this: <br>
--> <br>
<docFactory enabled="false" type="XML Template" /> <br>
</docFactories><br>
- <!-- <br>
<x-tab> </x-tab> - <directories/> determines which directories are indexed. By default,<br>
<x-tab> </x-tab> - the /system directory is never indexed, so it is safe to index root.<br>
<x-tab> </x-tab> -<br>
<x-tab> </x-tab> - If you want to specify only certain directories for indexing, create<br>
<x-tab> </x-tab> - one <directory/> entry per directory. Again, you may use subsearch to<br>
<x-tab> </x-tab> - override the default subsearch setting discussed above.<br>
<x-tab> </x-tab> <br><br>
--> <br>
- <directories><br>
- <directory location="/"><br>
<section>Root</section> <br>
<subsearch>true</subsearch> <br>
</directory><br>
</directories><br>
- <!-- <br>
- Use this section to define specific contentDefinitions. Provided below<br>
<x-tab> </x-tab> - are entries for the news and forum modules.<br>
<x-tab> </x-tab> <br><br>
--> <br>
- <contentDefinitions><br>
- <contentDefinition type="news"><br>
<class>com.opencms.modules.homepage.news.NewsContentDefinition</class> <br>
<initClass>net.grcomputing.opencms.search.lucene.NewsInitialization</initClass> <br>
- <listMethod name="getNewsList"><br>
<param type="java.lang.Integer">1</param> <br>
<param type="java.lang.String">-1</param> <br>
</listMethod><br>
- <page uri="/news.html?__element=entry"><br>
<param method="getIntId" name="newsid" /> <br>
</page><br>
</contentDefinition><br>
- <contentDefinition type="forum"><br>
<class>de.wfnetz.opencms.modules.forum.ContributionContentDefinition</class> <br>
- <listMethod name="getSortedList"><br>
<param type="java.lang.String" /> <br>
</listMethod><br>
- <page uri="/forum.html?forumtemplate=viewcontributionentry"><br>
<param method="getId" name="conid" /> <br>
</page><br>
</contentDefinition><br>
</contentDefinitions><br>
</luceneSearch><br>
- <!-- <br>
- END lucene config<br>
<br><br>
--> <br><br>
<br>
<b><u>Error code<br><br>
</u></b>[23.06.2004 16:06:10] <opencms_cronscheduler> Starting job for com.opencms.core.CmsCronEntry{6 16 * * * admin Administrators net.grcomputing.opencms.search.lucene.CronIndexManager createIndex=true}<br>
[23.06.2004 16:06:10] <opencms_cronscheduler> Error running job for com.opencms.core.CmsCronEntry{6 16 * * * admin Administrators net.grcomputing.opencms.search.lucene.CronIndexManager createIndex=true} Error: com.opencms.core.CmsException: 0 Unknown exception. Detailed error: Error instantiating class de.wfnetz.opencms.modules.forum.ContributionContentDefinition. <br>
root cause was java.lang.ClassNotFoundException: de.wfnetz.opencms.modules.forum.ContributionContentDefinition<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown Source)<br>
<x-tab> </x-tab>at com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)<br>
>-----------<br>
>Root cause:<br>
>java.lang.ClassNotFoundException: de.wfnetz.opencms.modules.forum.ContributionContentDefinition<br>
><x-tab> </x-tab>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1443)<br>
><x-tab> </x-tab>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)<br>
><x-tab> </x-tab>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)<br>
><x-tab> </x-tab>at java.lang.Class.forName0(Native Method)<br>
><x-tab> </x-tab>at java.lang.Class.forName(Class.java:141)<br>
><x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown Source)<br>
><x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown Source)<br>
><x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown Source)<br>
><x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown Source)<br>
><x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown Source)<br>
><x-tab> </x-tab>at com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)<br><br>
java.lang.ClassNotFoundException: de.wfnetz.opencms.modules.forum.ContributionContentDefinition<br>
<x-tab> </x-tab>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1443)<br>
<x-tab> </x-tab>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)<br>
<x-tab> </x-tab>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)<br>
<x-tab> </x-tab>at java.lang.Class.forName0(Native Method)<br>
<x-tab> </x-tab>at java.lang.Class.forName(Class.java:141)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown Source)<br>
<x-tab> </x-tab>at net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown Source)<br>
<x-tab> </x-tab>at com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)<br>
</body>
</html>