Infrastructure at your Service

Daniel Westermann

Install PL/JAVA in Postgres Plus Advanced Server 9.5

While doing a project at a customer we came to a point where we needed to install pl/java into Postgres Plus Advanced Server 9.5. If you follow the official documentation you will probably fail and get stuck when trying to build pl/java with maven (at least I did fail several times). Unfortunately there is not much documentation around for solving the issues that popped up. As we have a very good communication channel into EnterpriseDB we finally got the instructions on how to do it the right way:

If you did a standard installation of Postgres Plus Advanced server you should find a pljava.jar file in the “lib” directory of the installation:

[email protected]:/home/enterprisedb/ [PG2] ls /u01/app/postgres/product/95/db_0/9.5AS/lib/pljava.jar 
/u01/app/postgres/product/95/db_0/9.5AS/lib/pljava.jar

The next step is to point the “pljava.classpath” parameter to the location of this jar file:

[email protected]:/home/enterprisedb/ [PG2] sqh
Null display is "NULL".
Timing is on.
psql.bin (9.5.0.5)
Type "help" for help.

([email protected][local]:5445) [postgres] > alter system set pljava.classpath='/u01/app/postgres/product/95/db_0/9.5AS/lib/pljava.jar';
ERROR:  unrecognized configuration parameter "pljava.classpath"
Time: 0.327 ms
([email protected][local]:5445) [postgres] > 

Hm, does not work. So lets add it directly to the postgresql.conf configuration file:

[email protected]:/u02/pgdata/PG2/ [PG2] echo "pljava.classpath='/u01/app/postgres/product/95/db_0/9.5AS/lib/pljava.jar'" >> /path/to/postgresql.conf

When the Postgres Plus Advanced server starts up it needs to know the location of the java libraries so adjusting the LD_LIBRARY_PATH environment variable is a good idea (if you want to do make that persistent add it to the startup script of Postgres Plus Aavanced server):

[email protected]:/u02/pgdata/PG2/ [PG2] export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/lib/amd64/server/:$LD_LIBRARY_PATH 

Once ready the server can be restarted and the “pljava.classpath” parameter should be set:

[email protected]:/u02/pgdata/PG2/ [PG2] pg_ctl restart -D /u02/pgdata/PG2/ -m fast


([email protected][local]:5445) [postgres] > show pljava.classpath;
                    pljava.classpath                    
--------------------------------------------------------
 /u01/app/postgres/product/95/db_0/9.5AS/lib/pljava.jar
(1 row)

Time: 0.170 ms
([email protected][local]:5445) [postgres] > 

Great. The next step is to execute the installation script:

[email protected][local]:5445) [postgres] > \i /u01/app/postgres/product/95/db_0/9.5AS/share/pljava_install.sql                                                          

If everything went fine the output should look like this:

CREATE SCHEMA
Time: 1.375 ms
GRANT
Time: 0.855 ms
CREATE FUNCTION
Time: 304.740 ms
CREATE LANGUAGE
Time: 30.509 ms
CREATE FUNCTION
Time: 0.991 ms
CREATE LANGUAGE
Time: 0.926 ms
CREATE TABLE
Time: 38.192 ms
GRANT
Time: 1.327 ms
CREATE TABLE
Time: 7.942 ms
GRANT
Time: 0.999 ms
ALTER TABLE
Time: 2.919 ms
CREATE TABLE
Time: 3.061 ms
GRANT
Time: 1.004 ms
CREATE TABLE
Time: 4.768 ms
GRANT
Time: 0.978 ms
CREATE FUNCTION
Time: 1.402 ms
CREATE FUNCTION
Time: 20.138 ms
CREATE FUNCTION
Time: 1.386 ms
CREATE FUNCTION
Time: 0.878 ms
CREATE FUNCTION
Time: 0.861 ms
CREATE FUNCTION
Time: 1.353 ms
CREATE FUNCTION
Time: 1.116 ms
CREATE FUNCTION
Time: 1.823 ms
CREATE FUNCTION
Time: 1.160 ms

Looks fine. Lets verify if the language is really registered:

([email protected][local]:5445) [postgres] > select * from pg_language where lanname like 'java%';
 lanname | lanowner | lanispl | lanpltrusted | lanplcallfoid | laninline | lanvalidator | lanacl 
---------+----------+---------+--------------+---------------+-----------+--------------+--------
 java    |       10 | t       | t            |         16656 |         0 |            0 | NULL
 javau   |       10 | t       | f            |         16658 |         0 |            0 | NULL
(2 rows)

Time: 299.411 ms

Unfortunately pl/java is not listed as an extension:

([email protected][local]:5445) [postgres] > \dx
                                  List of installed extensions
       Name       | Version |   Schema   |                     Description                      
------------------+---------+------------+------------------------------------------------------
 edb_dblink_libpq | 1.0     | pg_catalog | EnterpriseDB Foreign Data Wrapper for PostgreSQL
 edb_dblink_oci   | 1.0     | pg_catalog | EnterpriseDB Foreign Data Wrapper for Oracle
 edbspl           | 1.0     | pg_catalog | EDB-SPL procedural language
 pldbgapi         | 1.0     | pg_catalog | server-side support for debugging PL/pgSQL functions
 plpgsql          | 1.0     | pg_catalog | PL/pgSQL procedural language
(5 rows)

All the object have been created in a dedicated schema which contains some tables and functions:

([email protected][local]:5445) [postgres] > \dn
    List of schemas
  Name  |    Owner     
--------+--------------
 public | enterprisedb
 sqlj   | enterprisedb
(2 rows)

([email protected][local]:5445) [postgres] > set search_path='sqlj';
SET
Time: 0.167 ms

([email protected][local]:5445) [postgres] > \d
                      List of relations
 Schema |           Name           |   Type   |    Owner     
--------+--------------------------+----------+--------------
 sqlj   | classpath_entry          | table    | enterprisedb
 sqlj   | jar_entry                | table    | enterprisedb
 sqlj   | jar_entry_entryid_seq    | sequence | enterprisedb
 sqlj   | jar_repository           | table    | enterprisedb
 sqlj   | jar_repository_jarid_seq | sequence | enterprisedb
 sqlj   | typemap_entry            | table    | enterprisedb
 sqlj   | typemap_entry_mapid_seq  | sequence | enterprisedb
(7 rows)

([email protected][local]:5445) [postgres] > \df
                                            List of functions
 Schema |        Name        | Result data type  |              Argument data types              |  Type  
--------+--------------------+-------------------+-----------------------------------------------+--------
 sqlj   | add_type_mapping   | void              | character varying, character varying          | normal
 sqlj   | drop_type_mapping  | void              | character varying                             | normal
 sqlj   | get_classpath      | character varying | character varying                             | normal
 sqlj   | install_jar        | void              | bytea, character varying, boolean             | normal
 sqlj   | install_jar        | void              | character varying, character varying, boolean | normal
 sqlj   | java_call_handler  | language_handler  |                                               | normal
 sqlj   | javau_call_handler | language_handler  |                                               | normal
 sqlj   | remove_jar         | void              | character varying, boolean                    | normal
 sqlj   | replace_jar        | void              | bytea, character varying, boolean             | normal
 sqlj   | replace_jar        | void              | character varying, character varying, boolean | normal
 sqlj   | set_classpath      | void              | character varying, character varying          | normal
(11 rows)

Time to see if it is really working and to create a simple java program:

CREATE FUNCTION getsysprop(VARCHAR) RETURNS VARCHAR
  AS 'java.lang.System.getProperty'
  LANGUAGE java;

This should return a result when executed:

([email protected][local]:5445) [postgres] > SELECT getsysprop('user.home');
     getsysprop     
--------------------
 /home/enterprisedb
(1 row)

Time: 707.600 ms

Fine, works. Have fun with pl/java.

Btw, for completeness there is a uninstall script, too:

([email protected][local]:5445) [postgres] > \! ls /u01/app/postgres/product/95/db_0/9.5AS/share/pljava_uninstall.sql                                  
/u01/app/postgres/product/95/db_0/9.5AS/share/pljava_uninstall.sql

28 Comments

  • Hi!

    I’m sorry to read that you had frustration with the Maven build, especially as you were doing this so recently, while PL/Java 1.5.0-BETA2 was in testing. A great opportunity to make sure any problems you ran into are known for the 1.5.0 release. There is still time: 1.5.0-BETA3 has just been tagged. It would be very helpful to know if there are problems building it in your environment.

    As to the instructions you obtained from EnterpriseDB, it sounds as if the pljava.jar you found in their lib directory might be quite old (five years, maybe?) Adjusting LD_LIBRARY_PATH? Running SQL install scripts? With 1.5.0 you maybe have to set pljava.libjvm_location, then say CREATE EXTENSION pljava; and there it is.

    You can upgrade from an older, non-extension version (like the one you installed) using the command CREATE EXTENSION pljava FROM unpackaged;

    If you check out the release notes at the official site, you’ll quite a lot of new development and fixes since the old version you installed, including some CVEs, so I would definitely advocate getting your customer onto the current version when you have a chance.

    Regards,
    -Chap

  • Daniel Westermann says:

    Hi Chap,

    thanks for your detailed comment. I’ll see that I find some time to re-try with the latest beta version. I’ll keep you updated.

    Cheers,
    Daniel

  • dhananjaya says:

    Sir I am getting some error like this
    postgres=# show pljava.classpath;
    ERROR: unrecognized configuration parameter “pljava.classpath”
    postgres=#

    Sir plz help me

  • dhananjaya says:

    postgres=# \i /opt/PostgresPlus/9.5AS/share/pljava_install.sql
    CREATE SCHEMA
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:6: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:8: ERROR: function sqlj.java_call_handler() does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:12: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:14: ERROR: function sqlj.javau_call_handler() does not exist
    CREATE TABLE
    GRANT
    CREATE TABLE
    GRANT
    ALTER TABLE
    CREATE TABLE
    GRANT
    CREATE TABLE
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:55: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:59: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:63: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:67: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:71: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:75: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:79: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:83: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:87: ERROR: language “java” does not exist
    postgres=#

  • Daniel Westermann says:

    do you have the jdk installed on your server?
    did you set LD_LIBRARY_PATH to point to libjvm.so before you started PostgreSQL ?
    which version/distribution of linux are you running?

    cheers,
    daniel

  • dhananjaya says:

    sir
    i installed jdk 8 and LD_LIBRARY_PATH also set
    i am using centos 7
    my LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/lib/amd64/server/:$LD_LIBRARY_PATH

  • Daniel Westermann says:

    and you restarted PostgreSQL after you changed the LD_LIBRARY_PATH?
    is libjvm.so available in “/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/lib/amd64/server/” ?

  • dhananjaya says:

    after changing LD_LIBRARY_PATH i restarted postgresSQL and libjvm.so also avalibale in same directory .
    But sorry sir i haven’t restarted the postgresSQL before. now i can see pljava.classpath but pljava installation again getting some error.
    postgres=# show pljava.classpath;
    pljava.classpath
    —————————————-
    /opt/PostgresPlus/9.5AS/lib/pljava.jar
    (1 row)

    postgres=# \i /opt/PostgresPlus/9.5AS/share/pljava_install.sql
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:1: ERROR: schema “sqlj” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:6: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:8: ERROR: function sqlj.java_call_handler() does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:12: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:14: ERROR: function sqlj.javau_call_handler() does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:23: ERROR: relation “jar_repository” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:32: ERROR: relation “jar_entry” already exists
    GRANT
    ALTER TABLE
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:43: ERROR: relation “classpath_entry” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:50: ERROR: relation “typemap_entry” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:55: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:59: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:63: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:67: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:71: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:75: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:79: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:83: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:87: ERROR: language “java” does not exist

  • Daniel Westermann says:

    what is the output of:
    ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/lib/amd64/server/
    and
    ldd /opt/PostgresPlus/9.5AS/lib/pljava.so

  • dhananjaya says:

    postgres=# \i /opt/PostgresPlus/9.5AS/share/pljava_install.sql
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:1: ERROR: schema “sqlj” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:6: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:8: ERROR: function sqlj.java_call_handler() does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:12: ERROR: could not load library “/opt/PostgresPlus/9.5AS/lib/pljava.so”: libjvm.so: cannot open shared object file: No such file or directory
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:14: ERROR: function sqlj.javau_call_handler() does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:23: ERROR: relation “jar_repository” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:32: ERROR: relation “jar_entry” already exists
    GRANT
    ALTER TABLE
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:43: ERROR: relation “classpath_entry” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:50: ERROR: relation “typemap_entry” already exists
    GRANT
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:55: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:59: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:63: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:67: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:71: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:75: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:79: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:83: ERROR: language “java” does not exist
    psql.bin:/opt/PostgresPlus/9.5AS/share/pljava_install.sql:87: ERROR: language “java” does not exist

  • dhananjaya says:

    sir actualy i installed jdk on my /uo1 directory so i changed my LD_LIBRARY_PATH to export “LD_LIBRARY_PATH=/u01/jdk1.8.0_91/jre/lib/amd64/server/:$LD_LIBRARY_PATH”. is it correct path sir

    out put from the path
    ls /u01/jdk1.8.0_91/jre/lib/amd64/server/
    libjsig.so libjvm.so Xusage.txt
    [[email protected] server]# ls /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/jre/lib/amd64/server/
    classes.jsa libjsig.so libjvm.so Xusage.txt

    [[email protected] server]# ldd /opt/PostgresPlus/9.5AS/lib/pljava.so
    linux-vdso.so.1 => (0x00007ffff96ff000)
    libjvm.so => not found
    libc.so.6 => /lib64/libc.so.6 (0x00007faa2cd2d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007faa2d332000)
    [[email protected] server]#

  • Daniel Westermann says:

    this is your issue:

    [[email protected] server]# ldd /opt/PostgresPlus/9.5AS/lib/pljava.so
    linux-vdso.so.1 => (0x00007ffff96ff000)
    libjvm.so => not found /lib64/libc.so.6 (0x00007faa2cd2d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007faa2d332000)

    how did you restart PostgreSQL? Using systemctl? or on the command line? When you use systemctl or service then you need to adjust the startup scripts to include the LD_LIBRARY_PATH pointing to your ibjvm.so

  • dhananjaya says:

    Sir i restarted PostgresSQL using below
    -bash-4.2$ /opt/PostgresPlus/9.5AS/bin/pg_ctl restart -D /opt/PostgresPlus/9.5AS/data -m fast
    waiting for server to shut down…. done
    server stopped
    server starting
    -bash-4.2$ 2016-06-08 11:40:36 IST LOG: redirecting log output to logging collector process
    2016-06-08 11:40:36 IST HINT: Future log output will appear in directory “pg_log”.

    -bash-4.2$ exit

  • dhananjaya says:

    Sir plz explain how to add LD_LIBRARY_PATH to startup script and how to restart the postgreSQL

  • dhananjaya says:

    -bash-4.2$ ldd /opt/PostgresPlus/9.5AS/lib/pljava.so linux-vdso.so.1 => (0x00007fff7ce9e000)
    libjvm.so => /u01/jdk1.8.0_91/jre/lib/amd64/server/libjvm.so (0x00007f671711f000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f6716d4b000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f6716a49000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f6716845000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6716628000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f6718333000)

  • Daniel Westermann says:

    before you do this:

    /opt/PostgresPlus/9.5AS/bin/pg_ctl restart -D /opt/PostgresPlus/9.5AS/data -m fast

    please send let me know:
    echo $LD_LIBRARY_PATH

    only when this is set correctly start PostgreSQL

  • dhananjaya says:

    [[email protected] lib]# echo $LD_LIBRARY_PATH
    /u01/jdk1.8.0_91/jre/lib/amd64/server/:
    [[email protected] lib]#

    sir plz help

  • Daniel Westermann says:

    you are connected as root. please connect as postgres or enterprisedb (depending on how you installed)

  • dhananjaya says:

    -bash-4.2$ export LD_LIBRARY_PATH=/u01/jdk1.8.0_91/jre/lib/amd64/server/:$LD_LIBRARY_PATH
    -bash-4.2$ echo $LD_LIBRARY_PATH
    /u01/jdk1.8.0_91/jre/lib/amd64/server/:
    -bash-4.2$

    if i exit enterprisedb user it will go

  • Daniel Westermann says:

    when connected as enterprisedb:

    export LD_LIBRARY_PATH=/u01/jdk1.8.0_91/jre/lib/amd64/server/:$LD_LIBRARY_PATH
    /opt/PostgresPlus/9.5AS/bin/pg_ctl stop -D /opt/PostgresPlus/9.5AS/data -m fast
    /opt/PostgresPlus/9.5AS/bin/pg_ctl start -D /opt/PostgresPlus/9.5AS/data
    echo LD_LIBRARY_PATH

    what is the output?

  • dhananjaya says:

    [[email protected] lib]# su – enterprisedb
    Last login: Wed Jun 8 19:46:08 IST 2016 on pts/1
    -bash-4.2$ export LD_LIBRARY_PATH=/u01/jdk1.8.0_91/jre/lib/amd64/server/:$LD_LIBRARY_PATH
    -bash-4.2$ /opt/PostgresPlus/9.5AS/bin/pg_ctl stop -D /opt/PostgresPlus/9.5AS/data -m fast
    waiting for server to shut down…. done
    server stopped
    -bash-4.2$ /opt/PostgresPlus/9.5AS/bin/pg_ctl start -D /opt/PostgresPlus/9.5AS/data
    server starting
    -bash-4.2$ 2016-06-09 09:09:32 IST LOG: redirecting log output to logging collector process
    2016-06-09 09:09:32 IST HINT: Future log output will appear in directory “pg_log”.

    -bash-4.2$ echo LD_LIBRARY_PATH
    LD_LIBRARY_PATH
    -bash-4.2$ echo $LD_LIBRARY_PATH
    /u01/jdk1.8.0_91/jre/lib/amd64/server/:
    -bash-4.2$

  • Daniel Westermann says:

    can you now install PL/JAVA ?

  • dhananjaya says:

    Sir plz send me how to Install PL/JAVA in Postgres Plus Advanced Server 9.3 link

  • dhananjaya says:

    Sir my pl-java installation completed with no error

    Thank you for your support sir
    and also provide me Installation PL/JAVA in Postgres Plus Advanced Server 9.3 link

  • Daniel Westermann says:

    I don’t have a dedicated post for 9.3. You should be able to do that on your own with all the information in this post.
    Cheers,
    Daniel

  • dhananjaya says:

    Thank you sir
    and one more thing for edb 9.3 pl java should be download separately.

  • Manjula Kumaragama says:

    Hi,

    I am getting an error when i try to install java externstion to pgsql-9.5.3

    pg_log:
    ERROR: could not load library “/usr/pgsql-9.5/lib/pljava.so”: /usr/pgsql-9.5/lib/pljava.so: undefined symbol: NonSPLFunctionContext

    Postgres User: .bash_profile

    PGDATA=/var/lib/pgsql/9.5/data
    export PGDATA
    export PATH=/usr/java/jdk1.8.0_91/bin:$PATH
    export LD_LIBRARY_PATH=/usr/java/jdk1.8.0_91/jre/lib/amd64/server:$LD_LIBRARY_PATH

    pg_config:
    BINDIR = /usr/pgsql-9.5/bin
    DOCDIR = /usr/pgsql-9.5/doc
    HTMLDIR = /usr/pgsql-9.5/doc/html
    INCLUDEDIR = /usr/pgsql-9.5/include
    PKGINCLUDEDIR = /usr/pgsql-9.5/include
    INCLUDEDIR-SERVER = /usr/pgsql-9.5/include/server
    LIBDIR = /usr/pgsql-9.5/lib
    PKGLIBDIR = /usr/pgsql-9.5/lib
    LOCALEDIR = /usr/pgsql-9.5/share/locale
    MANDIR = /usr/pgsql-9.5/share/man
    SHAREDIR = /usr/pgsql-9.5/share
    SYSCONFDIR = /etc/sysconfig/pgsql
    PGXS = /usr/pgsql-9.5/lib/pgxs/src/makefiles/pgxs.mk
    CONFIGURE = ‘–enable-rpath’ ‘–prefix=/usr/pgsql-9.5’ ‘–includedir=/usr/pgsql-9.5/include’ ‘–mandir=/usr/pgsql-9.5/share/man’ ‘–datadir=/usr/pgsql-9.5/share’ ‘–with-perl’ ‘–with-python’ ‘–with-tcl’ ‘–with-tclconfig=/usr/lib64’ ‘–with-openssl’ ‘–with-pam’ ‘–with-gssapi’ ‘–with-includes=/usr/include’ ‘–with-libraries=/usr/lib64’ ‘–enable-nls’ ‘–with-uuid=e2fs’ ‘–with-libxml’ ‘–with-libxslt’ ‘–with-ldap’ ‘–with-system-tzdata=/usr/share/zoneinfo’ ‘–sysconfdir=/etc/sysconfig/pgsql’ ‘–docdir=/usr/pgsql-9.5/doc’ ‘–htmldir=/usr/pgsql-9.5/doc/html’ ‘CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX_OOM_ADJ=0’ ‘LDFLAGS=-Wl,–as-needed’
    CC = gcc
    CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include
    CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX_OOM_ADJ=0
    CFLAGS_SL = -fpic
    LDFLAGS = -L../../../src/common -Wl,–as-needed -L/usr/lib64 -Wl,–as-needed -Wl,-rpath,’/usr/pgsql-9.5/lib’,–enable-new-dtags
    LDFLAGS_EX =
    LDFLAGS_SL =
    LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -lcrypt -ldl -lm
    VERSION = PostgreSQL 9.5.3

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Daniel Westermann
Daniel Westermann

Principal Consultant & Technology Leader Open Infrastructure