[Pljava-dev] ERROR: could not load library "/postgresql-7.4.2/libpljava.so": libjvm.so

Thomas Hallgren thhal at mailblocks.com
Tue Aug 10 21:04:44 UTC 2004


Gilberto,

> I am getting the following error message when i am trying to deploy 
> pl/java
>  
> java.sql.SQLException: ERROR:  could not load library 
> "/postgresql-7.4.2/libpljava.so": libjvm.so: cannot open shared object 
> file: Arquivo ou diret?o n?encontrado
>  

Your LD_LIBRARY_PATH points to the $JAVA_HOME/jre/lib/i386/server but 
not to the directory above it where a lot of neede shared object files 
reside. The error reported from the shared object loader is probably 
somewhat misleading. It does indeed find the libjvm.so but it fails on 
one of its dependencies. Try this setting instead:

$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client

You should never use both the client VM and server VM in your 
LD_LIBRARY_PATH. The client VM is faster on start-up and consumes less 
memory while the server vm is more aggressive with optimizations and 
will run faster in the long run (and consume some more memory).

Regards,

Thomas Hallgren




More information about the Pljava-dev mailing list