[Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3

From: johann at myrkraverk(dot)com (Johann 'Myrkraverk' Oskarsson)
To:
Subject: [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
Date: 2010-11-18 14:29:54
Message-ID: AANLkTinYzSR5b_Ec9RrRVw=-nWLZ1Tv2LeYtVnJXphZ+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On Thu, Nov 18, 2010 at 12:51 PM, Sandeep Thakkar <sandeeptt at yahoo.com> wrote:
> On Linux64 bit, when we try to load pljava.so, we get? " undefined symbol:
> JNI_CreateJavaVM" error. This happens when we use PG8.3. We built
> pljava-1.3.0 from sources.
>
> Against PG8.4, the error goes away when we set <JRE_HOME>/lib/amd64/server
> path to LD_LIBRARY_PATH, because this symbol is defined in libjvm.so. We
> built pljava-1.4.0 from sources.
>
> Is this a bug with pljava-1.3.0? Or something to do with PG8.3??

JNI_CerateJavaVM is the function (entry point) that loads and creates
the java virtual machine pljava uses. Pljava has to find it
somewhere. That is why the (my) Postgres server is configured to have
the location of libjvm.so somewehre in its LD_LIBRARY_PATH when you
install pljava.

When you say Linux 64 bit, I presume you mean the Postgres server,
pljava and the virtual machine are built for amd64?

For my server the environment is:

JAVA_HOME = '/usr/lib/jvm/java-6-openjdk/jre'
LD_LIBRARY_PATH =
'/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/native_threads'

For amd64 binaries you will have to replace i386 with amd64.

Hope this helps,

Johann

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Sandeep Thakkar 2010-11-19 06:31:07 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
Previous Message Sandeep Thakkar 2010-11-18 12:51:49 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3