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

From: sandeeptt at yahoo(dot)com (Sandeep Thakkar)
To:
Subject: [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
Date: 2010-11-19 06:31:07
Message-ID: 381319.70885.qm@web52006.mail.re2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Yes everything is built for amd64.

My environment settings are:
JAVA_HOME=<installation_dir>/jre
LD_LIBRARY_PATH=<installation_dir>/jre/lib/amd64:<installation_dir>/jre/lib/amd64/native_threads:<installation_dir>/jre/lib/amd64/server:$LD_LIBRARY_PATH

then I restart the dbserver and I install pljava. and I get the same error.

another interesting thing is that 'ldd pljava.so' does not show the dependency
on libjvm.so.
$ ldd lib/pljava.so
libc.so.6 => /lib64/libc.so.6 (0x00002ac7d831d000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b7f800000)

________________________________
From: Johann 'Myrkraverk' Oskarsson <johann at myrkraverk.com>
To: pljava-dev at pgfoundry.org
Sent: Thu, November 18, 2010 7:59:54 PM
Subject: Re: [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing
pljava-1.3.0 on Postgresql8.3

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
_______________________________________________
Pljava-dev mailing list
Pljava-dev at pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pljava-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20101118/8ccc1a7b/attachment.html>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Johann 'Myrkraverk' Oskarsson 2010-11-19 12:15:07 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
Previous Message Johann 'Myrkraverk' Oskarsson 2010-11-18 14:29:54 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3