On Tue, 15 Feb 2011, Roman Chyla wrote:

On Tue, Feb 15, 2011 at 1:32 AM, Andi Vajda <va...@apache.org> wrote:

On Tue, 15 Feb 2011, Roman Chyla wrote:

The python embedded in Java works really well on MacOsX and also
Ubuntu. But I am trying hard to make it work also on Scientific Linux
(SLC5) with *statically* built Python. The python is a build from
ActiveState.

You mean you're going to try to dynamically load libpython.a into a JVM ?
I have no idea if this can work at all.

I am very ignorant as far as the difference between statically and
dynamically linked libraries go - I just wanted to use JCC wrapped
code with this particular statically linked python

I got little bit further, but just little:

after I changed -Xlinker --export-dynamic into "-Xlinker
-export-dynamic" (and installed python into /opt...) I am getting a
different error:

SEVERE: org.apache.jcc.PythonException: No module named solrpie.java_bridge
null
        at org.apache.jcc.PythonVM.instantiate(Native Method)
        at rca.python.jni.PythonVMBridge.start(Unknown Source)
        at rca.python.jni.PythonVMBridge.start(Unknown Source)
        at rca.python.jni.PythonVMBridge.start(Unknown Source)
        at rca.python.jni.SolrpieVM.getBridge(Unknown Source)


My understanding is that the previous error has gone (and the python
module "time" is loaded), because if I set PYTHONPATH incorrectly, I
get:
This message is IMHO coming from Python

Yes, you hit the problem where C python modules are not finding symbols in the main python library because at link time, there not linked with it since they're assumed to all be loaded dynamically into a Python process.
In jcc, this is worked around in jcc.cpp, line 515 and on.

Andi..

Reply via email to