From: | pierce at hogranch(dot)com (John R Pierce) |
---|---|
To: | |
Subject: | [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6? |
Date: | 2012-10-10 23:00:20 |
Message-ID: | 5075FE04.4020407@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 10/10/12 12:17 PM, Kris Jurka wrote:
> Yes, the latest release of the JDBC drivers were botched and built
> with the wrong java version. I don't know what the status of a fix
> for that is, but you should be able to run the deployer with Java6 to
> install pljava for a different java version because the deployer is
> all client side and has nothing to do with the server jvm.
*OUCH* ... we have a LOT of legacy stuff running on 1.5 but
hoookay.... switched to jdbc4 and jdk6 for the deployer...
$ /usr/java6_64/bin/java -cp deploy.jar:postgresql-9.2-1000.jdbc4.jar
org.postgresql.pljava.deploy.Deployer -install -host 127.0.0.1 -port
5432 -user postgres -password go_team
org.postgresql.util.PSQLException: ERROR: could not load library
"/opt/XXX/pljava/pljava.so": Could not load module
/opt/XXX/pljava/pljava.so.
Dependent module libpljava.a(pljava.so) could not be loaded.
Could not load module libpljava.a(pljava.so).
System error: No such file or directory
Could not load module /opt/XXX/pljava/pljava.so.
Dependent module /opt/XXX/pljava/pljava.so could not be loaded.
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:395)
at
org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
and this is in the postgres log file...
2012-10-10 14:26:43 PDT postgres at 127.0.0.1[postgres|27853020]: ERROR:
could not load library "/opt/XXX/pljava/pljava.so": Could not load
module /opt/XXX/pljava/pljava.so.
Dependent module libpljava.a(pljava.so) could not be
loaded.
Could not load module libpljava.a(pljava.so).
System error: No such file or directory
Could not load module /opt/XXXpljava/pljava.so.
Dependent module /opt/XXX/pljava/pljava.so could not be
loaded.
2012-10-10 14:26:43 PDT postgres at 127.0.0.1[postgres|27853020]:
STATEMENT: CREATE FUNCTION sqlj.java_call_handler() RETURNS
language_handler AS 'pljava' LANGUAGE C
2012-10-10 14:26:43 PDT postgres at 127.0.0.1[postgres|27853020]: LOG:
unexpected EOF on client connection
$ ldd pljava.so
pljava.so needs:
/usr/lib/libc.a(shr_64.o)
Cannot find libpljava.a(pljava.so)
/usr/java5_64/jre/bin/j9vm/libjvm.a
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libc_r.a(shr_64.o)
/usr/lib/libpthread.a(shr_xpg5_64.o)
Cannot find libjsig.so
Cannot find libj9thr23.so
yet....
$ echo $LD_LIBRARY_PATH
/opt/XXX/pljava:/usr/java5_64/jre/bin:/opt/pgsql91/lib
$ find /usr/java5_64 -name libjsig.so -o -name libj9thr23.so
/usr/java5_64/jre/bin/libj9thr23.so
/usr/java5_64/jre/bin/libjsig.so
and here's the init.d script I used to postgres to setup the library
path and stuff...
# cat /etc/rc.d/init.d/postgres91
#!/usr/bin/ksh
# simple postgres sysVinit script
#
# Make sure that /opt and pgdata is mounted
#####################################
[ ! -d /opt/pgsql91 ] && exit 1
[ ! -d /u01/pgsql91 ] && exit 1
export PATH=/usr/bin:/opt/pgsql91/bin
export PGDATA=/u01/pgsql91/data
#### pljava stuff...
export JAVA_HOME=/usr/java5_64
export
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/ppc64:/opt/XXX/pljava:/opt/pgsql91/lib
export PATH=$PATH:$JAVA_HOME/bin
###
su postgres -c "pg_ctl $1"
and, all my components are in that /opt/XXX/pljava directory, including
the .so I built.
$ pwd
/opt/XXX/pljava
$ ls -l
total 0
-rw-r--r-- 1 postgres staff 5470 Oct 10 11:41 deploy.jar
-rw-r--r-- 1 postgres staff 47441 Oct 10 11:41 examples.jar
-rw-r--r-- 1 postgres staff 156110 Oct 08 22:42 pljava.jar
-rwxr-xr-x 1 postgres staff 87723 Oct 09 14:34 pljava.so
-rw-r--r-- 1 postgres staff 548226 Oct 01 05:57
postgresql-9.1-903.jdbc3.jar
-rw-r--r-- 1 postgres staff 578823 Sep 27 07:51
postgresql-9.2-1000.jdbc4.jar
and, here's whats in postgresql.conf...
$ tail /u01/pgsql91/data/postgresql.conf
#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------
#custom_variable_classes = '' # list of custom variable class
names
dynamic_library_path = '$libdir:/opt/XXX/pljava:/usr/java5_64/jre/bin'
custom_variable_classes = 'pljava'
pljava.classpath = '/opt/XXX/pljava/pljava.jar'
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2012-10-11 23:58:00 | [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6? |
Previous Message | Kris Jurka | 2012-10-10 19:17:45 | [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6? |