[pylucene-dev] NullPointerException in writer.optimize() - Compiling PyLucene on CentOS 5

Felix Schwarz felix.schwarz at web.de
Wed Sep 19 07:50:14 PDT 2007


Hi,

I compiled PyLucene on CentOS 5 (i386) in order to built an rpm. 
Compiling works fine but afterwards "make test" does not:
$ make test
cd samples/LuceneInAction; /usr/bin/python index.py
Tao Te Ching 道德經
Stephen Mitchell
taoism
/philosophy/eastern
---------
...
---------
Traceback (most recent call last):
   File "index.py", line 11, in ?
     False)
   File 
"/home/fs/rpmbuild/BUILD/PyLucene-src-2.2.0-1/samples/LuceneInAction/lia/common/TestDataDocumentHandler.py", 
line 46, in createIndex
     writer.optimize()
PyLucene.JavaError: java.lang.NullPointerException
make: *** [samples/LuceneInAction/index] Fehler 1

The same thing happens in custom applications as soon writer.optimize() 
is called.

I used this configuration:
VERSION=2.2.0-1
LUCENE_SVN_VER=549438
LUCENE_VER=2.2.0-$(LUCENE_SVN_VER)
LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/java/trunk
PYTHON_VER=2.4
DB_VER=4.3.29
...
PREFIX=/usr
PREFIX_PYTHON=/usr
LIBDIR_NAME=lib
GCJ_HOME=/usr
GCJ_LIBDIR=$(GCJ_HOME)/$(LIBDIR_NAME)
GCJ_STATIC=0
LIB_INSTALL=
PYTHON=$(PREFIX_PYTHON)/bin/python

$ gcj --version
gcj (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)

What other information do you need to diagnose the problem? How I can I 
debug this?


fs


More information about the pylucene-dev mailing list