agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] PLJAVA - could not load library libpljava ...
Date: Mon, 27 Jun 2005 17:31:43 +0200
Message-ID: <thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@mailblocks.com> (raw)
In-Reply-To: <loom.20050627T131714-377@post.gmane.org>
References: <loom.20050627T131714-377@post.gmane.org>
	<42C01BDF.8030306@mailblocks.com>
	<thhal-0YrSbA183zzYAE/DcKg6xEywL0+7cxw@mailblocks.com>

Rose,
First of all, the LD_LIBRARY_PATH is not applicable in a Windows 
environment. Windows use the PATH environment to find both executables 
and executable extensions (a.k.a. shared libraries or dll's). So, your 
problem is either the dynamic_library_path setting in the 
postgresql.conf or the PATH setting. LD_LIBRARY_PATH can be skipped 
altogether.

Placing the libpljava.dll in the root catalog seems to be a very bad 
choice and it doesn't solve any problem. Let libpljava.dll remain in the 
pl/java installation directory and set the dynamic_library_path to point 
to that directory.

The PATH environment that appoints the Sun Java dll's must be in effect 
for the PostgreSQL *server*. Setting it before you execute a *client* 
program (such as the deployer) will not help one bit. If you run the 
PostgreSQL as a service, the setting must be a system setting and the 
service must be restarted if you change it.

The PATH entries relevant to PL/Java are, assuming that your JAVA_HOME 
appoints the JRE (as opposed to jdk):

%JAVA_HOME%\bin\client;%JAVA_HOME%\bin

skip everything else under %JAVA_HOME%. It's irrelevant.

Regards,
Thomas Hallgren

Rose Tha? wrote:

>Hello
>
>I'm a newbie so sorry if I do terrific mistakes, I have read almost all the
>thread dealing with the PLJAVA install under windows XP, but I'm stil having
>some trouble.
>
>Here are all the details necessary, I still don't know what I got wrong.
>
>I have tried somebody's solution to put the libpljava.dll file in C:/ and change
>the dynamic library path as $libdir;c:\\ but it's still the same!
>I have put copy of the .dll into postgres \lib folder
>sqlj is created in postgres but empty.
>
>Can somebody help me, please?
>I have spent now 5 days and still don't have a clue how to deal with...
>
>Thanks a lot
>
>Rose
>
>
>
>config
>in postgresql.conf:
>pljava.classpath = 'C:\\MesApplications\\pgsql\\pljava\\pljava.jar'
>dynamic_library_path = 'C:\\MesApplications\\pgsql\\pljava'
>
>pljava: C:\MesApplications\pgsql\pljava
>java: C:\MesApplications\Sun\ServApp; 
>java.exe: C:\MesApplications\Sun\ServApp\jdk\bin
>jre: C:\MesApplications\Sun\ServApp\jdk\jre\bin
>version: java version "1.4.2_07"
>Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
>Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
>
>postgresql: C:\MesApplications\pgsql   - version 8.0
>
>set JAVA_HOME=C:\MesApplications\Sun\ServApp\jdk\jre
>set LD_LIBRARY_PATH=C:\MesApplications\pgsql\lib;%JAVA_HOME%\lib\i386;
>%JAVA_HOME%\lib\i386\client;C:\MesApplications\pgsql\bin;%JAVA_HOME%\bin\i386;
>%JAVA_HOME%\bin\i386\client;%JAVA_HOME%\bin\client;
>
>set PATH=%PATH%;C:\MesApplications\pgsql\bin;%JAVA_HOME%\bin;
>C:\MesApplications\Sun\ServApp\jdk\bin;
>C:\MesApplications\Sun\ServApp\bin;%LD_LIBRARY_PATH%
>
>set CLASSPATH=C:\MesApplications\pgsql\pljava\deploy.jar;
>C:\MesApplications\pgsql\jdbc\postgresql-8.0-310.jdbc3.jar
>
>java -cp
>C:\MesApplications\pgsql\pljava\deploy.jar;
>C:\MesApplications\pgsql\jdbc\postgresql-8.0-310.jdbc3.jar
>org.postgresql.pljava.deploy.Deployer -reinstall -user pgs -password pgs
>-database compiere
>
>error:
>java.sql.SQLException: ERROR: could not load library "C:/MesApplications/pgsql/l
>ib/libpljava.dll": dynamic load error
>        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
>ecutorImpl.java:1471)
>        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
>Impl.java:1256)
>        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
>va:175)
>        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
>ement.java:388)
>        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
>Jdbc2Statement.java:313)
>        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
>ement.java:305)
>        at org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:
>419)
>        at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:275)
>
>
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>  
>






view thread (2+ messages)

Message-ID: <thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@mailblocks.com>
Permalink:  ../thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@mailblocks.com/
Also on:    postgresql.org/message-id/thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@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] PLJAVA - could not load library libpljava ...
  In-Reply-To: <thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@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