agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] difficulty loading library libpljava.so
Date: Sun, 01 May 2005 10:11:32 +0200
Message-ID: <42748F34.2030503@mailblocks.com> (raw)
In-Reply-To: <42740EFB.6040108@globalera.com>
References: <42740EFB.6040108@globalera.com>

Vince Clark wrote:

> I am trying to install pljava1.1.0. Running Postgres 8.0.2 on SuSE 9.2
>
> I consistently receive the following error:
> ERROR:  could not load library 
> "/var/lib/pgsql/pljava-1.1.0/build/objs/libpljava.so": 
> /var/lib/pgsql/pljava-1.1.0/build/objs/libpljava.so: cannot open 
> shared object file: No such file or directory
> java.sql.SQLException: ERROR: could not load library 
> "/var/lib/pgsql/pljava-1.1.0/build/objs/libpljava.so": 
> /var/lib/pgsql/pljava-1.1.0/build/objs/libpljava.so: cannot open 
> shared object file: No such file or directory
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:306)
>         at 
> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:419)
>         at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:275)
>
> Here is the value for dynamic_library_path in pogresql.conf file:
> dynamic_library_path = 
> '/var/lib/pgsql/pljava-1.1.0/build/objs/:/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/lib/i386/client/'
>
> And LD_LIBRARY_PATH is set to:
> /var/lib/pgsql/pljava-1.1.0/build/objs/:/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/lib/i386/client/
>
> I have restarted Postgres.

My guess is that your dynamic_library_path should look like this:

dynamic_library_path = '$libdir:/var/lib/pgsql/pljava-1.1.0/build/objs'

and you LD_LIBRARY_PATH like this:

/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/lib/i386/client:/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/lib/i386

Java uses two directories. You had the jre/lib/i386/client correct. The 
directory above 'client' must be included also.

The dynamic_library_path is used by PostgreSQL to find modules but this 
setting will not have any effect on the library loader, and vice versa. 
What normally happens when a module is loaded is:

1. PostgreSQL constructs absolute paths based on the 
dynamic_library_path setting. It attempts those paths in succession 
until the module can be found.
2. For most modules #1 is enough. Some modules, like PL/Java needs other 
shared objects and the OS library loader will load them automatically. 
The library loader uses LD_LIBRARY_PATH and has no access to the 
dynamic_library_path.

I hope this helps.

Regards,
Thomas Hallgren


> -- 
> Vince Clark
> Global Era
> The freedom of open source.
> (303) 433-4221 ext. 201
> (303) 455-2409 fax
> vclark at globalera.com <mailto:vclark at globalera.com>
> www.globalera.com
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>  
>





view thread (2+ messages)

Message-ID: <42748F34.2030503@mailblocks.com>
Permalink:  ../42748F34.2030503@mailblocks.com/
Also on:    postgresql.org/message-id/42748F34.2030503@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] difficulty loading library libpljava.so
  In-Reply-To: <42748F34.2030503@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