agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
4+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
@ 2010-11-18 12:51
2010-11-18 14:29 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
0 siblings, 1 reply; 4+ messages in thread
From: @ 2010-11-18 12:51 UTC (permalink / raw)
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??
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20101118/ba263880/attachment.html;
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 12:51 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
@ 2010-11-18 14:29 `
2010-11-19 06:31 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
0 siblings, 1 reply; 4+ messages in thread
From: @ 2010-11-18 14:29 UTC (permalink / raw)
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 12:51 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 14:29 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
@ 2010-11-19 06:31 `
2010-11-19 12:15 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
0 siblings, 1 reply; 4+ messages in thread
From: @ 2010-11-19 06:31 UTC (permalink / raw)
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;
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 12:51 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 14:29 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-19 06:31 ` [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
@ 2010-11-19 12:15 `
0 siblings, 0 replies; 4+ messages in thread
From: @ 2010-11-19 12:15 UTC (permalink / raw)
Hi,
On Fri, Nov 19, 2010 at 6:31 AM, Sandeep Thakkar <sandeeptt at yahoo.com> wrote:
> 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.
Just because your environment settings include the right
LD_LIBRARY_PATH does not mean the server's does. In ubuntu (my setup)
I have to put the variables in /etc/postgresql/8.4/main/environment.
You can also try to build pljava.so with the paths built-in by using
the -rpath flag. Again, I'm a bit hazy on how to do it but I think
you can just add LDFLAGS='-rpath <installation_dir>/jre/lib/amd64
-rpath <installation_dir>/jre/lib/amd64/native_threads -rpath
<installation_dir>/jre/lib/amd64/server' before invoking ./configure?
This assumes GCC. With the sunstudio compiler use -R instead.
> 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)
That just means the virtual machine is loaded with dlopen(). The last
time I did this in my own code, I was using OpenVMS so I'm a bit hazy
on the Unix details.
Johann
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2010-11-19 12:15 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 12:51 [Pljava-dev] undefined symbol: JNI_CreateJavaVM on installing pljava-1.3.0 on Postgresql8.3
2010-11-18 14:29 `
2010-11-19 06:31 `
2010-11-19 12:15 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox