agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Problems compiling under Mac OS X
Date: Sat, 15 May 2004 12:28:37 +0200
Message-ID: <40A5F0D5.70304@mailblocks.com> (raw)
In-Reply-To: <EFB7619E-A5DE-11D8-B83E-0003933F0AB6@mac.com>
References: <E02918AC-A580-11D8-9A58-0003933F0AB6@mac.com>
<06f301c439a2$74ee5c80$eb4917ac@cor>
<thhal-0vz+AAa2rClw0+6EGmM3qaXukrWQwAP@mailblocks.com>
<thhal-0wD+AAa+rClwp/lFSxAL2BRewQcwRbx@mailblocks.com>
<C7B71C1A-A5B7-11D8-9A58-0003933F0AB6@mac.com>
<40A51B2A.2060408@mailblocks.com>
<EFB7619E-A5DE-11D8-B83E-0003933F0AB6@mac.com>
p3consulting wrote:
> Thomas,
>
> I think what could be the easiest is an independant shell script
> (triggered by make test) doing some automated testing (creating a new
> database, the tables, filling with some data, etc.) to see if
> everything is ok.
I agree. That's a good suggestion. I'll look into improving the tests. I
think I'll write the tests Java and spawn the JVM with correct classpath
using Ant rather than using make and shell-scripts though, to make it
more portable.
> Asking to look at another contrib like spi may be confusing...
> especially in case of trouble.
The Server Programming Interface (SPI) is not another contrib. It's an
integral part of the PostgreSQL core distribution and it's the function
package on which the Pl/Java JDBC driver is built. I agree it's not
ideal to refer to it but rather than copying and maintaining a vast
amount of information from the PostgreSQL manual (I have somewhat
limited resources ;-), I chosed to mention it in the user guide in order
to explain:
a) why some limitations are there that is due to the use of SPI.
b) that the JDBC connection runs within the same transaction as the invoker.
c) that detailed info regarding the command execution can be found,
reading about the SPI in the PostgreSQL manual.
> I suppose I would have to change it to:
>
> su - postgres -c 'sh -c "( export
> CLASSPATH=/Library/Java/Extensions/pljava.jar ;
> /usr/local/bin/postmaster -i -D /usr/local/pgsql/data >>
> /usr/local/pgsql/logs/logfile 2>&1 & )"'
>
> What do you think ? More to put in the CLASSPATH ? the postgresql.jar ?
Your suggested classpath looks OK. The postgresql.jar should not be in
the classpath since Pl/Java uses it's own JDBC driver that sits directly
on top of the SPI functions.
Another prerequisite is that the LD_LIBRARY_PATH is set so that the
postmaster can find the jvm shared lib (in the Java distribution).
Judging from the error you get, your setting must be correct, the pljava
shared lib wouldn't load at all if it was wrong.
Kind regards,
Thomas Hallgren
view thread (7+ messages) latest in thread
Message-ID: <40A5F0D5.70304@mailblocks.com>
Permalink: ../40A5F0D5.70304@mailblocks.com/
Also on: postgresql.org/message-id/40A5F0D5.70304@mailblocks.com
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: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Problems compiling under Mac OS X
In-Reply-To: <40A5F0D5.70304@mailblocks.com>
* 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