Easy way to find JAVA_HOME

2012-05-08 Thread Christian Heimes
Hello, I found a much easier to detect the path to JAVA_HOME on Unix-like platforms where the java command is in the search path. java -verbose prints out the paths of all loaded JAR files. Christian --- import subprocess import re import os PATH_RE = re.compile(Loaded\ .*\ from\

jccjmx - Java Management Extension for JCC

2012-05-07 Thread Christian Heimes
Hello, I've developed a small helper package for JCC to monitoring the embedded JRE. It constructs a SSH-tunnel friendly JMX connector. With JMX you can monitor all sorts of stuff like memory usage, CPU usage, threads, loaded classes etc. With jvisualvm you can even profile your application,

Re: [VOTE] Release PyLucene 3.6.0

2012-05-05 Thread Christian Heimes
Am 05.05.2012 03:32, schrieb Andi Vajda: The PyLucene 3.6.0-1 release tracking the recent release of Apache Lucene 3.6.0 is ready. A release candidate is available from: http://people.apache.org/~vajda/staging_area/ A list of changes in this release can be seen at:

Re: [VOTE] Release PyLucene 3.5.0 rc3

2011-12-09 Thread Christian Heimes
Am 09.12.2011 06:26, schrieb Andi Vajda: There were some issues again with rc2. Thank you all for having reported them ! Please vote on rc3: The PyLucene 3.5.0-3 release closely tracking the recent release of Apache Lucene 3.5.0 is ready. A release candidate is available from:

Re: [VOTE] Release PyLucene 3.3.0

2011-07-03 Thread Christian Heimes
Am 03.07.2011 18:17, schrieb Andi Vajda: What kind of errors ? So I added the grouping module to the PyLucene branch_3x build and it just built (tm). I even committed the change to the build (rev 1142455) but I didn't check that the grouping module was functional in PyLucene as I didn't

Re: [VOTE] Release PyLucene 3.3.0

2011-07-02 Thread Christian Heimes
Am 01.07.2011 14:24, schrieb Andi Vajda: The PyLucene 3.3.0-1 release closely tracking the recent release of Lucene Java 3.3 is ready. A release candidate is available from: http://people.apache.org/~vajda/staging_area/ A list of changes in this release can be seen at:

Re: Excluding inner classes is broken

2011-05-30 Thread Christian Heimes
Am 27.05.2011 23:33, schrieb Andi Vajda: So far the patch is reliable and has improved the stability a lot. I haven't seen a single segfault under Linux X86_64 today. Our test suite has run a dozen times or more. The last five Win32 X86 test runs were stable, too. I integrated your patch

segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Hello, I've updated our software stack from Python 2.6.6 to Python 2.7.1. Since the update I'm seeing random segfaults all related to JCCEnv::deleteGlobalRef() and Python's GC. At first I thought the bug is an incompatibility between Python 2.7 and JCC 2.7. However an update to JCC 2.8 and

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 17:36, schrieb Andi Vajda: As you can clearly see, the JNIEnv_ instance is a NULL pointer. Contrary to my initial assumption, the thread doesn't have a JCC thread local object. Since any thread may trigger a GC collect run, and not just threads, that use JCC, this looks like a

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 18:14, schrieb Christian Heimes: --- import lucene import threading import time import gc lucene.initVM() def alloc(): while 1: gc.collect() time.sleep(0.011) t = threading.Thread(target=alloc) t.daemon = True t.start() while 1: obj

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
There shouldn't be any random threads. Threads don't just appear out of thin air. You create them. If there is a chance that they call into the JVM, then attachCurrentThread(). I've already made sure, that all our code and threads are calling a hook, which attaches the thread to the JVM. But

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 18:27, schrieb Andi Vajda: Does it crash as easily with Python 2.6 ? If not, then that could be an answer as to why this wasn't noticed before. With 20 test samples, it seems like Python 2.6 survives 50% longer than Python 2.7. python2.6 0, 1.089 1, 2.688 2, 1.066 3, 6.416 4,

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 18:26, schrieb Andi Vajda: There shouldn't be any random threads. Threads don't just appear out of thin air. You create them. If there is a chance that they call into the JVM, then attachCurrentThread(). I've already made sure, that all our code and threads are calling a hook,

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 19:03, schrieb Andi Vajda: If these libraries use Python's Thread class you have some control. Create a subclass of Thread that runs your hook and insert it into the threading module (threading.Thread = YourThreadSubclass) before anyone else gets a chance to create threads.

Re: segfault in JCCEnv::deleteGlobalRef

2011-05-11 Thread Christian Heimes
Am 11.05.2011 19:41, schrieb Andi Vajda: If these functions eventually instantiate a Thread class, even indirectly, the monkey-patching may still work. Some of the code doesn't use the threading module at all, just thread or the internal C API. I'd have to patch the modules and C code. That

Re: Feature request: include collation

2010-09-29 Thread Christian Heimes
Am 27.09.2010 03:59, schrieb Andi Vajda: In 3.x and trunk, I've been porting ICU-dependant Lucene contrib features to use PyICU [1][2] (which depends on C++ ICU). I think that having PyLucene depend both on C++ ICU and Java ICU is one ICU too many :-), though. I'm not sure at this point

Re: Feature request: include collation

2010-09-27 Thread Christian Heimes
Am 27.09.2010 03:59, schrieb Andi Vajda: In 3.x and trunk, I've been porting ICU-dependant Lucene contrib features to use PyICU [1][2] (which depends on C++ ICU). I think that having PyLucene depend both on C++ ICU and Java ICU is one ICU too many :-), though. I'm not sure at this point

Re: Feature request: include collation

2010-09-27 Thread Christian Heimes
Am 27.09.2010 17:19, schrieb Andi Vajda: The Normalizer2 class, referred to by this nrm2 format, was introduced in ICU 4.4. http://icu-project.org/apiref/icu4c/classNormalizer2.html That's it! Thanks for the hint. Christian

Re: Feature request: include collation

2010-09-27 Thread Christian Heimes
Am 27.09.2010 17:19, schrieb Andi Vajda: The Normalizer2 class, referred to by this nrm2 format, was introduced in ICU 4.4. http://icu-project.org/apiref/icu4c/classNormalizer2.html That's it! Thanks for the hint. Christian

Re: API changes between 2.9.2 and 2.9.3

2010-07-21 Thread Christian Heimes
Presumably that's no longer the case with JCC 2.6. Probably should be updated to whatever the current version does. Or perhaps versioned and checked into the source tree. It could be related to the --no-generics addition. Have you tried to recompile PyLucene with the option JCCFLAGS=?

Re: Problems passing PyLucene objects to jcc-wrapped bobo-browse api

2010-05-20 Thread Christian Heimes
Am 18.05.2010 23:19, schrieb Andi Vajda: The definition of 'sensible' then becomes a shouting match. This is why there is a dozen of so-called sensible defaults for each and every platform claimed to be supported. Between python 2.5, 2.6 and 2.7 the way to invoke a module from the command line

Re: Problems passing PyLucene objects to jcc-wrapped bobo-browse api

2010-05-18 Thread Christian Heimes
The Makefile has about a dozen sets of defaults for a variety of platforms. Pick the one closest to your setup, uncomment it (and change it if needed). Then you don't have to enter these on the command line. My point is that you may want to remove most examples and replace them with sensible

Re: Problems passing PyLucene objects to jcc-wrapped bobo-browse api

2010-05-13 Thread Christian Heimes
Am 13.05.2010 20:27, schrieb Andi Vajda: Here is an idea that I think should work but I couldn't test it because bobo is built from maven and pylucene isn't. Basically, the idea is that you must be really careful in not having Lucene classes come from two or more different places: 1. build

Re: [ANNOUNCE] Apache PyLucene 2.9.0

2009-10-14 Thread Christian Heimes
Andi Vajda wrote: I am pleased to announce the availability of Apache PyLucene 2.9.0. Thank you very much! I've created Windows 32bit binaries of JCC and PyLucene 2.9.0 for Python 2.4, 2.5 and 2.6 build with VS 7.1 and VS 9.0. I'm happy to share them with the rest of the world. They should put

Re: Problems in Pylucene and JCC

2009-09-17 Thread Christian Heimes
Truffe Hugo wrote: File c:\python25\lib\site-packages\JCC-2.3-py2.5-win32.egg\jcc\__init__.py, line 30, in module from _jcc import initVM ImportError: DLL load failed: Can not find the specified module make: *** [install] Error -1 Do you have the jvm.dll in your PATH? Christian

Re: Problems in Pylucene with Win XP

2009-09-12 Thread Christian Heimes
Andi Vajda wrote: Do you really ? If so why ? If there is a library mismatch, can I not recompile Python 2.5 with VC++ 2008 ? Distutils doesn't allow to compile extensions with another version of MSVC than the version Python has been compiled with. The official build of Python 2.5 is compiled

Re: Problems in Pylucene with Win XP

2009-09-12 Thread Christian Heimes
Andi Vajda wrote: Yeah, I remember now. I guess Hugo should move to Python 2.6 - it's built with VC++ 2008, right? - if getting the older VC++ compiler is not possible. Hugo, is there any reason for you not to use Python 2.6 ? You are correct, Python 2.6 and 3.0 are using VS 2008 aka

Re: Problems in Pylucene with Win XP

2009-09-10 Thread Christian Heimes
Truffe Hugo schrieb: Hi, I'm using PyLucene in Win XP, and is throwing me the following. G:\Solr\Pylucene svnpython setup.py build -c mingw32 [snip] PyLucene doesn't support mingw32 out of the box. You need to patch JCC and you have to install a new version of GCC, too. Christian

Re: Problems in Pylucene with Win XP

2009-09-10 Thread Christian Heimes
Andi Vajda wrote: it is my understanding that current JCC can be built with mingw32 out of the box (apart from changes in compiler and linker settings in setup.py). If there are patches to be applied for this to work out of the box, please send them in so that they can be merged in. There

Re: Problems in Pylucene with Win XP

2009-09-10 Thread Christian Heimes
Andi Vajda schrieb: On Thu, 10 Sep 2009, Christian Heimes wrote: AFAIK it's getting harder and harder to acquire VS 7 for free. Microsoft has removed all download links unless you have a MSDN subscription. Err, http://www.google.com/search?q=downloading+VC+expressie=utf-8oe=utf-8aq=trls

Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Christian Heimes
KK wrote: kk-laptop:~/softies/socs/PyLucene-2.2.0-1/jcc$ python setup.py build running build running build_py creating build creating build/lib.linux-i686-2.6 creating build/lib.linux-i686-2.6/jcc copying jcc/cpp.py - build/lib.linux-i686-2.6/jcc copying jcc/config.py -

Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Christian Heimes
KK schrieb: Thanks Christian. After installing python-dev i'm able to do the build for jcc and then installed without gettig any error messages. Then from the main directory i changed the makefile and (surprisingly i dint see any site-packages directory under python2.6, but i still modified the

Re: pylucene windows

2009-07-23 Thread Christian Heimes
Edwin Madari schrieb: Appreciate if some one can share the information how you are running pylucne on windows environment. archives and installation page indicate windows, but no instruction on how to. without success installed cygwin, python, and tried compiling pylucene. Installed

Re: missing build.xml files in PyLucene distributions

2009-06-12 Thread Christian Heimes
edwin.mad...@verizonwireless.com wrote: never could use SVN though firewall (never worked for me) - oh well! To avoid this, I manually download what ever is needed. It works well for svn over http(s) but you have to configure svn to utilize your web proxy. Check out ~/.subversion/server By

Re: anyone succeed in building JCC with gcc on Cygwin windows for Pylucene

2009-06-03 Thread Christian Heimes
edwin.mad...@verizonwireless.com schrieb: For PyLucene, has anyone succeeded in building JCC with gcc version 3.4.4 on Cygwin windows? python setup.py build is throwing errors while compiling JArray.cpp that comes with PyLucene-2.4.0-2 .. jcc/sources/JArray.cpp: In instantiation of

jcc 2.2 fails to compile on Windows

2009-05-18 Thread Christian Heimes
I'm trying to compile JCC 2.2 for Python 2.6 with Visual Studio 2008. The build process fails with this error message: building 'jcc._jcc' extension C:\Programme\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /G S- /DNDEBUG -IC:\Programme\java\jdk1.6.0_12/include

Re: pylucene (SVN) fails under Python-2.6.2

2009-04-22 Thread Christian Heimes
Helmut Jarausch schrieb: Hi, has anybody tried to install PyLucene on a system running Python-2.6 (2.6.2 in my case) Installing jcc works just fine, but when executing 'make' I get /usr/bin/python -m jcc --shared --jar lucene-java-2.4.1/build/lucene-core-2.4.1.jar --jar

Re: [VOTE] Release PyLucene 2.4.1.y

2009-03-12 Thread Christian Heimes
Andi Vajda wrote: That's the problem. If I change my env or edit setup.py and config.py exists already because I already did a build, it is not going to be re-generated if I do 'python setup.py install' even though it should since 'install' calls 'build' (and people expect it to) yet 'build'

Re: PDFBox testcase

2009-03-10 Thread Christian Heimes
Andi Vajda wrote: I've attached an isolated testcase for you. You'll surely recognize the make file. It's based on your make file from PyLucene. I hope you don't mind ;) Thank you, that is very helpful in debugging this. But first, please do not contact me off list. Use the

Re: Wrapping PDFBox with JCC

2009-03-09 Thread Christian Heimes
Andi Vajda wrote: At first quick glance, you declare a native startPage method but your python class is not implementing it. On the other hand, it has a startArticle method. Oh, you are right. But that doesn't fix the issue. It's still failing with the error message SystemError: NULL result

Re: Windows binaries of JCC and PyLucene

2009-02-18 Thread Christian Heimes
Christian Heimes wrote: I'm looking for Windows binaries of JCC 2.1 and PyLucene 2.4. I tried to build the Windows binaries myself using Sun JDK 1.6.0u12 and MinGW32 but I had no luck. Good news everybody! Apparently the JCC sources are not compatible with GCC 3.4. I had more luck with GCC

Windows binaries of JCC and PyLucene

2009-02-17 Thread Christian Heimes
Hello! I'm looking for Windows binaries of JCC 2.1 and PyLucene 2.4. I tried to build the Windows binaries myself using Sun JDK 1.6.0u12 and MinGW32 but I had no luck. After some modifications to setup.py I got so far: building 'jcc._jcc' extension creating build\temp.win32-2.5\Release\_jcc