[opencms-dev] can't get lucene 1.5 to work

Olli Aro olli_aro at yahoo.co.uk
Wed Jun 23 10:29:02 CEST 2004


Try to take of the content definition stuff from your configuration.

 

Olli

 

   _____  

From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of Kelvin
Sent: 23 June 2004 08:18
To: opencms-dev at opencms.org
Subject: [opencms-dev] can't get lucene 1.5 to work

 

Hi All,

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.

Hope someone can tell me what is the problem with my configuration. Thanks a
lot

Cheers,
kelvin

Scheduled task entry
06 16 * * * admin Administrators
net.grcomputing.opencms.search.lucene.CronIndexManager createIndex=true


registry.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<registry>
    <system>
- <luceneSearch>
- <!-- 
          - mergeFactor and permCheck are currently ignored.
          

  --> 
  <mergeFactor>100000</mergeFactor> 
  <permCheck>true</permCheck> 
- <!-- 
          - directory in which lucene will store its indexes. Note: this is
real
          - fs, not VFS.
          

  --> 
  <indexDir>C:\luceneindex</indexDir> 
- <!--  <indexDir>F:\luceneindex\</indexDir> 
  --> 
- <!-- 
          - The analyzer is used for parsing documents. Choose one for your 
          - language. If language is English, use the StandardAnalyzer.
          - There are additional analyzers at HYPERLINK
"http://jakarta.apache.org/lucene"http://jakarta.apache.org/lucene
          

  --> 
  <analyzer>org.apache.lucene.analysis.standard.StandardAnalyzer</analyzer> 
- <!--  <analyzer>org.apache.lucene.analysis.de.GermanAnalyzer</analyzer> 
  --> 
- <!-- 
          - If subsearch is true, subfolders will be searched by default.
          - This can be turned on/off per directory.
          

  --> 
  <subsearch>true</subsearch> 
- <!-- 
          - Name of the project to index. Online is recommended.
          

  --> 
  <project>online</project> 
- <!-- 
          - docFactories determine how documents are processed. Generally,
one
          - docFactory exists for each type of content (viz. JSP, Page,
Plain) 
          - that you want to index.
          

  --> 
- <docFactories>
- <!-- 
             - This docFactory indexes documents with type page (e.g. HTML 
                 - files edited with the WYSIWYG editor). 
             

  --> 
- <docFactory enabled="true" type="page">
  <class>net.grcomputing.opencms.search.lucene.PageDocument</class> 
  </docFactory>
- <!-- 
             - This docFactory is a little more complex. It takes documents
of
                 - type "plain" and determines, by extension, what class
should be
                 - used to index each particular file. In this example, we
want to
                 - index plain text files exactly as they are, but any files
that 
                 - contain tags need the tags stripped out before they are
indexed.
                 -
                 - Note that the name="" attribute is simply for pretty
output, and 
                 - can contain any allowable PCDATA text.
                 

  --> 
- <docFactory enabled="true" type="plain">
- <fileType name="plaintext">
  <extension>.txt</extension> 
  <class>net.grcomputing.opencms.search.lucene.PlainDocument</class> 
  </fileType>
- <fileType name="taggedtext">
  <extension>.html</extension> 
  <extension>.htm</extension> 
  <extension>.xml</extension> 
- <!--  This will strip tags before processing 
  --> 
  <class>net.grcomputing.opencms.search.lucene.TaggedPlainDocument</class> 
  </fileType>
  </docFactory>
- <!-- 
             - This will strip JSP tags and all scriptlets. IT WILL NOT
RENDER THE
                 - JSP FIRST, as JSPs are, by nature, dynamic.
                 -
                 - Usually, this is off by default.
                 

  --> 
- <docFactory enabled="false" type="jsp">
  <class>net.grcomputing.opencms.search.lucene.JspDocument</class> 
  </docFactory>
- <!--  For the news module. Enable if you use news 
  --> 
- <docFactory enabled="false" type="news">
  <class>net.grcomputing.opencms.search.lucene.NewsDocument</class> 
  </docFactory>
- <!--  For the forum module. Enable if you use forums. 
  --> 
- <docFactory enabled="false" type="forum">
  <class>de.wfnetz.opencms.modules.forum.ContributionDocument</class> 
  </docFactory>
- <!--  If you need to index XML Template files (bad idea) use this: 
  --> 
  <docFactory enabled="false" type="XML Template" /> 
  </docFactories>
- <!-- 
          - <directories/> determines which directories are indexed. By
default,
          - the /system directory is never indexed, so it is safe to index
root.
          -
          - If you want to specify only certain directories for indexing,
create
          - one <directory/> entry per directory. Again, you may use
subsearch to
          - override the default subsearch setting discussed above.
          

  --> 
- <directories>
- <directory location="/">
  <section>Root</section> 
  <subsearch>true</subsearch> 
  </directory>
  </directories>
- <!-- 
     - Use this section to define specific contentDefinitions. Provided
below
         - are entries for the news and forum modules.
         

  --> 
- <contentDefinitions>
- <contentDefinition type="news">
  <class>com.opencms.modules.homepage.news.NewsContentDefinition</class> 
 
<initClass>net.grcomputing.opencms.search.lucene.NewsInitialization</initCla
ss> 
- <listMethod name="getNewsList">
  <param type="java.lang.Integer">1</param> 
  <param type="java.lang.String">-1</param> 
  </listMethod>
- <page uri="/news.html?__element=entry">
  <param method="getIntId" name="newsid" /> 
  </page>
  </contentDefinition>
- <contentDefinition type="forum">
 
<class>de.wfnetz.opencms.modules.forum.ContributionContentDefinition</class>

- <listMethod name="getSortedList">
  <param type="java.lang.String" /> 
  </listMethod>
- <page uri="/forum.html?forumtemplate=viewcontributionentry">
  <param method="getId" name="conid" /> 
  </page>
  </contentDefinition>
  </contentDefinitions>
  </luceneSearch>
- <!-- 
   - END lucene config
   

  --> 


Error code

[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}
[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. 
root cause was java.lang.ClassNotFoundException:
de.wfnetz.opencms.modules.forum.ContributionContentDefinition
        at
net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown
Source)
        at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown
Source)
        at
com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)
>-----------
>Root cause:
>java.lang.ClassNotFoundException:
de.wfnetz.opencms.modules.forum.ContributionContentDefinition
>       at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1443)
>       at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1289)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:141)
>       at
net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown
Source)
>       at
net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown
Source)
>       at
net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown
Source)
>       at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown
Source)
>       at
net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown
Source)
>       at
com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)

java.lang.ClassNotFoundException:
de.wfnetz.opencms.modules.forum.ContributionContentDefinition
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1443)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1289)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:141)
        at
net.grcomputing.opencms.search.lucene.SearchContentDefinition.<init>(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.SearchParameters.readConfig(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.SearchParameters.<init>(Unknown
Source)
        at net.grcomputing.opencms.search.lucene.IndexManager.<init>(Unknown
Source)
        at
net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown
Source)
        at
com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040623/4bcf5d44/attachment.htm>


More information about the opencms-dev mailing list