public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev]  build/deploy question
Date: Sat, 05 Sep 2015 17:28:06 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALBNtw4TkrFf5hMk8burieXTM-ehf49HqxJmfFHur=4Gq_8+UQ@mail.gmail.com>
References: <CALBNtw4TkrFf5hMk8burieXTM-ehf49HqxJmfFHur=4Gq_8+UQ@mail.gmail.com>

Bear Giles wrote:

> I'm exploring wrapping pljava in a postgresql extension and have something
> that loads it when I type 'create extension pljava' but it barfs when I
> try to actually do something - it gives me
>'java.lang.NoClassDefFoundError: org/postgresql/pljava/internal/Backend".

That's the usual symptom of not having pljava.classpath properly set
to find the pljava.jar file.

I do see that, in the "installing as extension" docs you contributed,
you have a line in the script to set pljava.classpath from sql. That
probably makes things work in the same session that has run
CREATE EXTENSION, but doesn't affect other or future sessions.

The usual way of getting the pljava.classpath setting to be cluster-wide
would be to add it to postgresql.conf (which seems imperfect, as it doesn't
completely fit in the extension model, but it may be the best we can do).

Since 9.4 there is an ALTER SYSTEM command like a persistent SET, that can
only be run by a superuser, and doesn't take effect until the next HUP
(I guess a session that already has to be superuser can call
pg_reload_conf). That seems more extension-friendly ... but I see that it
can't be run inside a transaction, and I would not be surprised if extension
scripts are being run inside a transaction ....

-Chap



view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Subject: Re: [Pljava-dev]  build/deploy question
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox