On Thu, 14 Apr 2011, Marcus wrote:
in a previous post, a user expressed problems running pylucene in a twistd app (running as a daemon) I have similar issues. I didn't see an answer in the postings. Everything works fine when twistd runs in foreground mode (twistd --nodaemon) the trick would seem to be knowing where is the right place to run initVM.
initVM() _must_ be run from the main thread before calling anything involving the embedded JVM.
env.attachCurrentThread() _must_ be run from any other thread before calling anything involving the embedded JVM.
Andi..