Subject: [Pljava-dev] PL/Java on postgres 9.1

From: Dan Bikle <[email-masked]>
Date: Wed, 27 Jul 2016 12:55:45 -0700

Hello List,

I want to install PL/Java on my postgres 9.1 instance.

I am following instructions I see here:

https://tada.github.io/pljava/install/install.html

The above instructions work well for postgres 9.5, 9.3.

On 9.1 I see this:

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PostgreSQL PL/Java ................................. SUCCESS [
15.191 s]
[INFO] PL/Java API ........................................ SUCCESS [
7.572 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [
3.088 s]
[INFO] PL/Java backend native code ........................ SUCCESS [
15.155 s]
[INFO] PL/Java Deploy ..................................... SUCCESS [
2.086 s]
[INFO] PL/Java Ant tasks .................................. SUCCESS [
2.365 s]
[INFO] PL/Java examples ................................... SUCCESS [
0.335 s]
[INFO] PL/Java packaging .................................. SUCCESS [
1.218 s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 55.829 s
[INFO] Finished at: 2016-07-27T15:33:42-04:00
[INFO] Final Memory: 45M/325M
[INFO]
------------------------------------------------------------------------
/usr/pgsql-9.1/lib/libpljava-so-1.5.0.so as bytes
/usr/pgsql-9.1/share/pljava/pljava-1.5.0.jar as bytes
/usr/pgsql-9.1/share/pljava/pljava-api-1.5.0.jar as bytes
/usr/pgsql-9.1/share/pljava/pljava-examples-1.5.0.jar as bytes
/usr/pgsql-9.1/share/extension/pljava.control as lines (ASCII)
/usr/pgsql-9.1/share/pljava/pljava--1.5.0.sql as lines (UTF8)
/usr/pgsql-9.1/share/pljava/pljava--unpackaged--1.5.0.sql as lines (UTF8)
/usr/pgsql-9.1/share/pljava/pljava--1.5.0-BETA3--1.5.0.sql as lines (UTF8)
/usr/pgsql-9.1/share/pljava/pljava--1.5.0-BETA2--1.5.0.sql as lines (UTF8)
/usr/pgsql-9.1/share/pljava/pljava--1.5.0-BETA1--1.5.0.sql as lines (UTF8)
--
-- pg_admin/set_pljava.sql
--
-- This script should CREATE EXTENSION pljava

SET pljava.libjvm_location TO
'/opt/jdk1.8.0_92/jre/lib/amd64/server/libjvm.so';
psql:/tmp/set_pljava.sql:8: ERROR:  unrecognized configuration parameter
"pljava.libjvm_location"
LOAD 'libpljava-so-1.5.0.so';
psql:/tmp/set_pljava.sql:9: WARNING:  Java virtual machine not yet loaded
DETAIL:  Pausing because "pljava.enable" is set "off".
HINT:  After changing any other settings as necessary, set it "on" to
proceed.
LOAD
\dx
                 List of installed extensions
  Name   | Version |   Schema   |         Description
---------+---------+------------+------------------------------
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
(1 row)

Q: How to tell postgres 9.1 that I want this:
SET pljava.libjvm_location TO
'/opt/jdk1.8.0_92/jre/lib/amd64/server/libjvm.so';

?

-Dan Bikle
_______________________________________________
Pljava-dev mailing list
[email-masked]
http://lists.pgfoundry.org/mailman/listinfo/pljava-dev

---

From: Chapman Flack <[email-masked]>
Date: Wed, 27 Jul 2016 16:07:18 -0400

On 07/27/2016 03:55 PM, Dan Bikle wrote:

> ...

Hi,

Those instructions are here:
http://tada.github.io/pljava/install/prepg92.html

Cheers,
-Chap

---

From: Chapman Flack <[email-masked]>
Date: Wed, 27 Jul 2016 16:42:49 -0400

> '/opt/jdk1.8.0_92/jre/lib/amd64/server/libjvm.so';

Just to summarize what the

page says, after you have reached this point (LOAD paused
because pljava.enable is off), you can issue that SET
command and it will be recognized. You will, then, also need
to SET pljava.enable TO on; to let the startup complete.

Once you've determined the settings that work, in PG < 9.2 you
have to edit them into postgresql.conf to make them persist.

-Chap