Install pljava on OpenSuSE

Install SUN/Oracle JDK and PostgreSQL via zypper or Yast.

Download pljava here http://pgfoundry.org/frs/?group_id=1000038&release_id=1024

Create a directory for example /usr/src/pljava and extract pljava there.

create /etc/ld.so.conf.d/postgres.conf with this two lines in it if your using i386 cpu architecture.

/usr/lib/jvm/java/lib
/usr/lib/jvm/jre/lib/i386/server

now you have to run:

ldconfig

edit /var/lib/pgsql/data/postgresql.conf and add this two lines

custom_variable_classes = 'pljava'
pljava.classpath = '/usr/lib/postgresql/pljava.jar'

copy /usr/src/pljava/pljava.jar and /usr/src/pljava/pljava.so to /usr/lib/postgresql/

cp /usr/src/pljava/pljava.jar /usr/lib/postgresql/
cp /usr/src/pljava/pljava.so /usr/lib/postgresql/

restart postgres service:

rcpostgres restart

apply the install.sql:

su postgres -c "/usr/bin/psql -d template1 -f /usr/src/pljava/install.sql"

Copyright © 2011 - All Rights Reserved

6 thoughts on “Install pljava on OpenSuSE

    1. Banym Post author

      Hi Tonny,

      yes of course i am fine with it. Nice post you wrote. Hope this will save a lot of time for some people out there.

      Regards,

      Dominik

      Reply
  1. Rick

    Hello,
    I am a beginner and I tried installing pljava in postgres9.2.
    There are a few issues which has made my day horrible
    1.I am not able to find any .so files
    2.I dont find any posstgresql.conf
    so instead of the edit /var/lib/pgsql/data/postgresql.conf i have edited the one from opt/psql/data

    Kindly help me out…This might be a crazy question as a beginner i dont know how to proceed..thanks in advance

    Reply
  2. Deepak Murthy

    Hello,

    I am using pgsql9.1 and i configured above way, i get beloow error when i run the install.sql script.

    [root@quickstart pljava]# psql postgres -d template1 -f install.sql
    CREATE SCHEMA
    GRANT
    psql:install.sql:6: ERROR: could not load library “pljava”: pljava: cannot open shared object file: No such file or directory
    psql:install.sql:8: ERROR: function sqlj.java_call_handler() does not exist
    psql:install.sql:12: ERROR: could not load library “pljava”: pljava: cannot open shared object file: No such file or directory
    psql:install.sql:14: ERROR: function sqlj.javau_call_handler() does not exist
    psql:install.sql:23: NOTICE: CREATE TABLE will create implicit sequence “jar_repository_jarid_seq” for serial column “jar_repository.jarid”
    psql:install.sql:23: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index “jar_repository_pkey” for table “jar_repository”
    psql:install.sql:23: NOTICE: CREATE TABLE / UNIQUE will create implicit index “jar_repository_jarname_key” for table “jar_repository”
    CREATE TABLE
    GRANT
    psql:install.sql:32: NOTICE: CREATE TABLE will create implicit sequence “jar_entry_entryid_seq” for serial column “jar_entry.entryid”
    psql:install.sql:32: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index “jar_entry_pkey” for table “jar_entry”
    psql:install.sql:32: NOTICE: CREATE TABLE / UNIQUE will create implicit index “jar_entry_jarid_entryname_key” for table “jar_entry”
    CREATE TABLE
    GRANT
    ALTER TABLE
    psql:install.sql:43: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index “classpath_entry_pkey” for table “classpath_entry”
    CREATE TABLE
    GRANT
    psql:install.sql:50: NOTICE: CREATE TABLE will create implicit sequence “typemap_entry_mapid_seq” for serial column “typemap_entry.mapid”
    psql:install.sql:50: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index “typemap_entry_pkey” for table “typemap_entry”
    CREATE TABLE
    GRANT
    psql:install.sql:55: ERROR: language “java” does not exist
    psql:install.sql:59: ERROR: language “java” does not exist
    psql:install.sql:63: ERROR: language “java” does not exist
    psql:install.sql:67: ERROR: language “java” does not exist
    psql:install.sql:71: ERROR: language “java” does not exist
    psql:install.sql:75: ERROR: language “java” does not exist
    psql:install.sql:79: ERROR: language “java” does not exist
    psql:install.sql:83: ERROR: language “java” does not exist
    psql:install.sql:87: ERROR: language “java” does not exist

    Do you have any suggestions.

    Reply
    1. Dominik Zajac Post author

      Hi Deepak,

      as the error says he can’t find the pljava shared library. Maybe you have to check if the library is available and functional with postgresql 9.1?
      The software I used with pljava has migrated there procedures away from it. Because of this I had no need to run pljava with newer postgres versions.

      Regards,

      Dominik

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>