[Pljava-dev] Building / installing for CentOS or Fedora

From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building / installing for CentOS or Fedora
Date: 2013-02-15 19:11:48
Message-ID: 20130215201148.32266079@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Am Fri, 15 Feb 2013 11:55:44 -0700
schrieb eggyknap <eggyknap at gmail.com>:

> On Fri, Feb 15, 2013 at 11:21:18AM -0700, eggyknap wrote:
> > Perhaps by installing your version of the nar plugin from github,
> > I've succeeded. I'll test this out. Thanks.
>
> Well, it's a qualified success. After running maven, I couldn't find
> any pljava.so or pljava.jar files anywhere

Maven calls the file slightly different:
pljava-so/target/nar/pljava-so-0.0.1-SNAPSHOT-amd64-Linux-gpp-shared/lib/amd64-Linux-gpp/shared/libpljava-so-0.0.1-SNAPSHOT.so

Running "mvn deploy" as root inside the pljava-so directory will
automatically copy it to /usr/lib/postgresql/9.2/main/pljava.so (or
whereever it belongs). Has still to be documented though :)

> so I went into various
> subdirectories and ran ant manually, which created some files named
> similarly to what I was looking for. I put them manually into the
> PostgreSQL $libdir, because I liked that method better than fiddling
> with dynamic_library_path, and after changing LD_LIBRARY_PATH so
> postgres could find libjvm.so, was able to create the language
> successfully.
>
> Now I'm loading the examples, and get this:
>
> pljava=# select
> sqlj.install_jar('file:///home/josh/devel/pljava-build/pljava-examples/target/pljava-examples-0.0.1-SNAPSHOT.jar',
> 'samples', true);
> WARNING: java.lang.NoClassDefFoundError:
> org/postgresql/pljava/internal/Backend
> ERROR: Unable to load class org/postgresql/pljava/internal/Backend
> using CLASSPATH
> '-Djava.class.path=target/lib//pljava.jar:/etc/alternatives/java_sdk/lib/management-agent.jar:/etc/alternatives/java_sdk/lib/tools.jar'
>
> I'll see if I can figure out how to make that target/lib/pljava.jar
> classpath absolute, and ... something meaninful. I expected maven to
> create nicely packaged .so and .jar files for me, and it didn't,
> which suggests I'm doing something else wrong.

The Backend class is part of pljava-jdbc so I assume that you did not
add the following lines (paths adjusted!) to your
/etc/postgresql/9.2/main/postgresql.conf:

pljava.classpath =
'.../pljava-api/target/pljava-api-0.0.1-SNAPSHOT.jar:.../pljava-jdbc/target/pljava-jdbc-0.0.1-SNAPSHOT.jar'
pljava.statement_cache_size = 10 pljava.release_lingering_savepoints =
true pljava.vmoptions = '-Xmx64M'
pljava.debug = false

More about this can be read in docs/userguide.html.

bye,

-christian-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20130215/5dd9b994/attachment-0001.bin>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message eggyknap 2013-02-15 21:00:36 [Pljava-dev] Building / installing for CentOS or Fedora
Previous Message eggyknap 2013-02-15 18:55:44 [Pljava-dev] Building / installing for CentOS or Fedora