Hi,
I am using PyLucene as search engine for my application and CherryPy as my web interface for my windows based application.
I have a problem that "I am not able to open PyLucene Index in write or modify mode from within classes for CherryPy".

following is the call which fails if made by CherryPy But same call works fine if it is made from normal python scripts getting executed directly.

writer = PyLucene.IndexWriter( "c:/index", PyLucene.StandardAnalyzer (), True)
JavaError: java.lang.NullPointerException

I beleive that it is Threads problem, as CherryPy creates seperate threads for handling each request.
I reffered the following "[pylucene-dev] PyLucene thread-safe?"  link

http://lists.osafoundation.org/pipermail/pylucene-dev/2004-June/000037.h 

Problem for me here is that, I am not creating threads on my own, but CherryPy is doing it.

To solve this problem,  should modify the CherryPy code and use  PyLuceneThread instead of its normal thread ?
Or is there any other simple way out to inform the PyLucene boehm-gc component of the java runtime - the garbage collector - about cherrypy thread upon its creation?

Or is there any other way which will allow CherryPy threads to work fine with PyLucene?

Thanx
---
Regards,
Pravin
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to