[Pljava-dev] PLJAVA - could not load library libpljava ...

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] PLJAVA - could not load library libpljava ...
Date: 2005-06-27 15:31:43
Message-ID: thhal-0ZLSbA2E3zzYnEwH2OBQRtmDCQLPAb0@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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
>
>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Bart Bremmers 2005-06-28 14:03:03 [Pljava-dev] A libpljava question you were not expecting
Previous Message Rose Thaï 2005-06-27 11:21:01 [Pljava-dev] PLJAVA - could not load library libpljava ...