0

I try to install pljava for postgesql 9.6 in Ubuntu 16.04, but it fails with error. A gradlew script makes an installation, but it fails with the following error"

Failed to execute: CREATE EXTENSION pljava; because: ERROR: could not access file "pljava-so-1.5.1-BETA1": No such file or directory

A gradlew source:

Sql sql = establishConnection()
        try {
            sql.execute("SET pljava.libjvm_location TO '${javaNative}';")
            sql.execute("SET pljava.vmoptions TO '-Xshare:on -XX:+DisableAttachMechanism';")
            sql.execute("ALTER DATABASE postgres SET pljava.libjvm_location FROM CURRENT;")
            sql.execute("ALTER DATABASE postgres SET pljava.vmoptions FROM CURRENT;")
            sql.execute("CREATE EXTENSION pljava;")
        } finally {
            sql.close()
        }

As i understand, it fails during a creation of extension pljava, commands above was executed without any errors.

According to @ChapmanFlack advice: I have no any mentions about pljava-so-1.5.1-BETA1 file at pg_config --libdir directory. Also i didn't find that file at pg_config --sharedir grep LOAD pljava--1.5.1-BETA1.sql output following:

touched off by the LOAD command, making possible a decent installation LOAD command, but finds the CREATE EXTENSION command instead). So, temporarily LOAD 'pljava-so-1.5.1-BETA1'; Ok, the LOAD succeeded, so everything happened ... unless ... the same PostgreSQL turns LOAD into a (successful) no-op in that case, meaning To fail fast in that case, expect that the LOAD actions should have

I think PL/Java builds from a prebuilt, because of that line at gradlew: commandLine 'java', '-jar', '../installer/build/dependencies/pljava-pg9.6.jar'

I would be appreciate for any advice

needpower
  • 3
  • 5
  • Hi, if you copied and pasted that error accurately, it looks like somewhere between Ubuntu and the PL/Java build you are using, the spelling of the dynamic library name doesn't agree. Can you run `pg_config --libdir` and cd to that directory, then cd extension and ls and paste the exact name of any `*pljava*` file you see there? Likewise `pg_config --sharedir` and cd there, `cd pljava`, `grep LOAD pljava--1.5.1-BETA1.sql` and paste that. Did you build PL/Java from source, or use a prebuilt (from where)? – Chapman Flack Aug 24 '17 at 01:08
  • Hi, If you have a way to run that `java -jar ...pljava-pg9.6.jar` command yourself, its output should show the exact path where it installed each file. If you do not have any `*pljava-so*` file at all in `$libdir/extension` then that explains why PL/Java won't load; the puzzle is only to find out *why* it's not there. – Chapman Flack Aug 24 '17 at 12:25
  • Hi, any updates? – Chapman Flack Aug 25 '17 at 23:32
  • Hi, yes, got some. I've tried to install PostgreSQL and pljava via docker, as my colleagues advice, but now problem is that i cant download license key from `keyserver.ubuntu.com` because of connection timeout. This is off the topic, so i will share result as soon as it possible – needpower Aug 27 '17 at 07:57

0 Answers0