[opencms-dev] Never mind - Lucene 1.5 null pointer exception

Chris Todd chris at christophertodd.com
Wed Mar 31 05:41:01 CEST 2004


After examining the Lucene source code, I realized that the directory
referenced by the java.io.tmpdir property for my Tomcat JVM did not exist,
and the Lucene source code fails to check if the directory exists prior to
attempting to obtain a list() from that directory.  Thus, the null pointer.

Regards,
Chris

-----Original Message-----
From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of Chris Todd
Sent: Tuesday, March 30, 2004 9:18 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Lucene 1.5 null pointer exception


I've installed the lucene 1.5 module, followed the readme, and setup the
following crontab job:
* * * * * admin Administrators
net.grcomputing.opencms.search.lucene.CronIndexManager
createIndex=true,registry=/home/me/tomcat4.0/webapps/mywebsite.com/opencms/W
EB-INF/config/luceneconfig.xml

My luceneconfig.xml file is completely default except for the <indexDir>,
which is:
<indexDir>/home/me/tomcat4.0/webapps/mywebsite.com/opencms/WEB-INF/luceneind
ex/</indexDir>

I have created the directory:
/home/me/tomcat4.0/webapps/mywebsite.com/opencms/WEB-INF/luceneindex/
And it has the following permissions:
drwxrwxr-x    2 me    me        4096 Mar 30 00:18 luceneindex

When I run the indexer, however, I get the following exception: [30.03.2004
21:10:10] <opencms_cronscheduler> Starting job for
com.opencms.core.CmsCronEntry{* * * * * admin Administrators
net.grcomputing.opencms.search.lucene.CronIndexManager
createIndex=true,registry=/home/ctodd/tomcat4.0/webapps/constantvigilance.im
agineis.net/opencms/WEB-INF/config/luceneconfig.xml}
[30.03.2004 21:10:10] <opencms_info> 
=====IndexManager===========================================================
==
[30.03.2004 21:10:10] <opencms_info> Analyzer:
org.apache.lucene.analysis.standard.StandardAnalyzer
[30.03.2004 21:10:10] <opencms_info> Extension map exists to handle
plaintext [30.03.2004 21:10:10] <opencms_info> Extension map exists to
handle taggedtext [30.03.2004 21:10:10] <opencms_info> Page DocumentFactory
loaded [30.03.2004 21:10:10] <opencms_cronscheduler> Error running job for
com.opencms.core.CmsCronEntry{* * * * * admin Administrators
net.grcomputing.opencms.search.lucene.CronIndexManager
createIndex=true,registry=/home/me/tomcat4.0/webapps/mywebsite.com/opencms/W
EB-INF/config/luceneconfig.xml} Error: java.lang.NullPointerException
	at org.apache.lucene.store.FSDirectory.create(FSDirectory.java:172)
	at org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:151)
	at
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:132)
	at
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:113)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:151)
	at
net.grcomputing.opencms.search.lucene.IndexManager.doIndex(Unknown Source)
	at
net.grcomputing.opencms.search.lucene.CronIndexManager.launch(Unknown
Source)
	at
com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)

Any ideas what the problem is?

Regards,
Chris

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list