Jpype on RHEL v3

benchline benchline at gmail.com
Fri Apr 7 12:57:16 EDT 2006


I have been trying out jpype for python to java work and love it.  It
works great on my gentoo box with the java 1.4.2 blackdown sdk.

I am now trying it on Red Hat Enterprise Linux 3 for access to business
intelligence tools (JasperReports, Mondrian, Pentaho, etc) for which we
don't have analogous tools in cpython yet.  My idea it to use jpype in
a cherrypy application server to tie these java BI tools into a website
interface without having to delve into the more complex java J2EE
application servers and lose all the python libraries that I know and
love.

Here is my problem.

When trying to start the jvm with the sun jre I get this error.

[root at servername root]# python2.4
Python 2.4.2 (#1, Dec  1 2005, 05:44:04)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
>>> jpype.startJVM('/usr/lib/jvm/java-1.4.2-sun/jre/lib/i386/client/libjvm.so')
Error occurred during initialization of VM
Unable to load native library: libjvm.so: cannot open shared object
file: No such file or directory

and then python dies.

When I try to start the jvm with the ibm jre I get this error.

[root at servername root]# python2.4
Python 2.4.2 (#1, Dec  1 2005, 05:44:04)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
>>> jpype.startJVM('/usr/lib/jvm/java-1.4.2-ibm-1.4.2.2/jre/bin/classic/libjvm.so')
Unable to find UTE, path used libjava.so/libute.so
JVMCI170: Please check the path to shared libraries
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/jpype/_core.py", line 25, in
startJVM
    _jpype.startup(jvm, tuple(args), True)
RuntimeError: Unable to start JVM at src/native/common/jp_env.cpp:54

but the python interpreter is still running.

Can anyone point me in the right direction so I can fix this?

Thanks




More information about the Python-list mailing list