[Pljava-dev] Help with pljava on centos 4.4, java 1.5.09, cvs pljava. with src rpm of postgresql 8.2.1

From: joshualross at gmail(dot)com (Joshua Ross)
To:
Subject: [Pljava-dev] Help with pljava on centos 4.4, java 1.5.09, cvs pljava. with src rpm of postgresql 8.2.1
Date: 2007-03-30 03:03:46
Message-ID: euhund$db5$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I had this problem today. The issue is the libjvm.so is not linked. To
verify this is the case execute the ldconfig command. Generally, ldconfig
is in /sbin/ or /usr/sbin/:

> /sbin/ldconfig -p |grep libjvm.so

If you don't get a response then it is not linked. So you need to add the
path to that library file in the ld.so.conf. If you followed the
instructions you probably created the file /etc/ld.so.conf.d/postgresql and
added a few directories in it. On redhat I found that the file
/etc/ld.so.conf.d/postgres does not get sourced by the ldconfig command.
This is becuase it was expecting a file with a .conf extension(there are way
to check this). So renaming the file /etc/ld.so.conf.d/postgresql to
/etc/ld.so.conf.d/postgresql.conf got the file correctly sourced. Then I
ran ldconfig again to rebuild the library list. Afterwards, running the
command above returned the correct result:

> /sbin/ldconfig -p |grep libjvm.so
libjvm.so (libc6,x86-64) =>
/usr/java/jdk1.5.0_11/jre/lib/amd64/server/libjvm.so

If you don't have the file /etc/ld.so.conf.d/postrgresql or posgresql.conf
created then you should create it. The file should have something like
this:

<jre_home>/lib/i386/
<jre_home>/lib/i386/client

Where <jre_home> is the location of your JRE. This will vary depending on
your setup. For mine, I had java in /usr/java/jdk_1.5.0_11/ and the box is
a 64-bit machine. So my file looked like this:

/usr/java/jdk_1.5.0_11/jre/lib/amd64
/usr/java/jdk_1.5.0_11/jre/lib/amd64/server

To correlate what these directories mean to your error message, my libjvm.so
file is located here:

/usr/java/jdk_1.5.0_11/jre/lib/amd64/server/libjvm.so

Hope this helps someone, we spent some time trying to get everything all
configured after building from cvs HEAD.

-Josh-

"William Heath" <wgheath at gmail.com> wrote in message
news:f08ddf990701231729n580815d6pbed98ec9734f1974 at mail.gmail.com...
Hi All,

I am in quite the quandry with pljava. I continue to get this message:

ERROR: could not load library "/usr/lib/pgsql/pljava.so": libjvm.so: failed
to map segment from shared object: Permission denied

I am using:

centos 4.4
java 1.5.09
src rpm of postgresql 8.2.1
cvs latest of pljava

Any ideas, or anything I could try?

Pertinent entries in /var/lib/pgsql/data/postgresql.conf

dynamic_library_path =
'$libdir:/var/lib/pgsql/org.postgresql.pljava/build/objs'
custom_variable_classes = 'pljava' # list of custom variable
class names
pljava.classpath = '/var/lib/pgsql/org.postgresql.pljava/build/pljava.jar'

ldconfig shows:
[root at DESN-OFF1 ~]# ldconfig -v |grep jvm
libjvm.so -> libjvm.so
[root at DESN-OFF1 ~]# ldconfig -v |grep pljava
/var/lib/pgsql/org.postgresql.pljava/build/objs:

cat /etc/ld.so.conf.d/postgresql.conf
/usr/share/jdk1.5.0_09/jre/lib/i386
/usr/share/jdk1.5.0_09/jre/lib/i386/client
/var/lib/pgsql/org.postgresql.pljava/build/objs

This output was generated when I ran:

-bash-3.00$ psql adempiere < install.sql
CREATE SCHEMA
GRANT
ERROR: could not load library "/usr/lib/pgsql/pljava.so": libjvm.so: failed
to map segment from shared object: Permission denied
ERROR: function sqlj.java_call_handler() does not exist
ERROR: could not load library "/usr/lib/pgsql/pljava.so": libjvm.so: failed
to map segment from shared object: Permission denied
ERROR: function sqlj.javau_call_handler() does not exist
NOTICE: CREATE TABLE will create implicit sequence
"jar_repository_jarid_seq" for serial column "jar_repository.jarid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"jar_repository_pkey" for table "jar_repository"
NOTICE: CREATE TABLE / UNIQUE will create implicit index
"jar_repository_jarname_key" for table "jar_repository"
CREATE TABLE
GRANT
NOTICE: CREATE TABLE will create implicit sequence "jar_entry_entryid_seq"
for serial column "jar_entry.entryid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"jar_entry_pkey" for table "jar_entry"
NOTICE: CREATE TABLE / UNIQUE will create implicit index
"jar_entry_jarid_key" for table "jar_entry"
CREATE TABLE
GRANT
ALTER TABLE
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"classpath_entry_pkey" for table "classpath_entry"
CREATE TABLE
GRANT
NOTICE: CREATE TABLE will create implicit sequence
"typemap_entry_mapid_seq" for serial column "typemap_entry.mapid"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"typemap_entry_pkey" for table "typemap_entry"
CREATE TABLE
GRANT
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist
ERROR: language "java" does not exist

_______________________________________________
Pljava-dev mailing list
Pljava-dev at gborg.postgresql.org
http://gborg.postgresql.org/mailman/listinfo/pljava-dev

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Blake Miller 2007-04-10 16:29:40 [Pljava-dev] Windows cannot access file pljava file
Previous Message Nick Snellock 2007-03-24 15:16:51 [Pljava-dev] pljava and openjms