I have been struggling to install PL/Java on Postgres (9.2,9.3, or 9.4) on OpenSuse, Mageia, or Manjaro...I don't like to complain -but the PL/Java documentation is horrible. And I've googled installation help for 2+weeks now, with little progress...
Does anyone know how to complete this install? If so, could you please enlighten the world with this unspoken secrete!
Here is the general form followed:
- Install Oracle JRE/JDK
- Install PostgreSQL
- Install PL/Java Dependencies
- Use Maven to Package PL/Java
- Try to install PL/Java using install.sql (+config stuff)
Step 1-3 are well documented and self explanatory, 4 seems straight forward, but it's step 5 where I can't seem to make any headway...
To install/what has been tried:
4 Move pljava.jar and pljava.so files (constructed from Maven) to some location, say:
/usr/lib/postgresql
5.1 Create a postgres.conf file, and place inside /etc/ld.so.conf.d/ with contents:
/usr/lib/jvm/jdk1.7.0_79/jre/lib
/usr/lib/jvm/jdk1.7.0_79/jre/lib/i386/server
5.2 Update postgresql.conf file inside /usr/share/postgres93/data/ with the following additions:
pljava.classpath = '/usr/lib/postgresql/pljava.jar'
5.3 Run install.sql script on database(lets say postgres -since it exists OOTB)
psql -d postgres -f /somelocation/install.sql
From what little information I can find, this should be all that is required, but I get the following error while executing the install.sql.
psql:/home/pljava/install.sql:6: ERROR: could not access file "pljava": No such file or directory
psql:/home/pljava/install.sql:8: ERROR: function sqlj.java_call_handler() does not exist
psql:/home/pljava/install.sql:12: ERROR: could not access file "pljava": No such file or directory
psql:/home/pljava/install.sql:14: ERROR: function sqlj.javau_call_handler() does not exist
CREATE TABLE
GRANT
CREATE TABLE
GRANT
CREATE TABLE
GRANT
CREATE TABLE
GRANT
CREATE TABLE
GRANT
psql:/home/pljava/install.sql:59: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:63: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:67: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:71: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:75: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:79: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:83: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:87: ERROR: language "java" does not exist
psql:/home/pljava/install.sql:91: ERROR: language "java" does not exist
Any ideas? This looks like it may be a java classpath issue?