[Pljava-dev] could not load library "C:/Program Files/PostgreSQL/8.2/lib/pljava.dll" when running deployer on Windows

From: David at Gradwell(dot)com (David JL Gradwell)
To:
Subject: [Pljava-dev] could not load library "C:/Program Files/PostgreSQL/8.2/lib/pljava.dll" when running deployer on Windows
Date: 2007-09-06 10:57:53
Message-ID: !&!AAAAAAAAAAAYAAAAAAAAAL3rFF4haA5Lp06jfFY9cODCgAAAEAAAAChSORcVRgdAseKX5gOTIG4BAAAAAA==@Gradwell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hi,

I'm trying to install PLJava on PostgreSQL 8.2 running on Windows 2003
Server, using deploy.jar

I get the following exception on running deploy.jar:

ERROR: could not load library "C:/Program
Files/PostgreSQL/8.2/lib/pljava.dll": The specified module could not be
found.

I've tried most things I could think of including:

a) checking that the referenced file is in C:/Program
Files/PostgreSQL/8.2/lib/ (which it is)

b) taking the SQL commands from install.sql and feeding
them one by one to Postgres through my well proven "give it an SQL command
GUI" that uses JDBC. (It fails on CREATE FUNCTION sqlj.java_call_handler()
RETURNS language_handler AS 'pljava' LANGUAGE C with the above error)

c) setting the environment variable PATH to include the
above lib

d) following the instructions in the readme
(file:///C:/General%20Filing/P/Postgres/plJava/install%20stuff/docs/readme.h
tml
<file:///C:\General%20Filing\P\Postgres\plJava\install%20stuff\docs\readme.h
tml> )

especially adding the following entry to the postgresql.conf file:

pljava.classpath = <pljava installation>/pljava.jar

and the bit on PostMaster configuration
(dynamic_library_path = '$libdir:<pljava installation>'Note that on the
win32 platform you need to use a semicolon as a path separator and double
backslashes (since backslash is the escape character in the postgresql.conf
file) as directory separators.

Although whether I got this right I'm not sure - a Windows
example would be good ! I have succeeded in setting this to a different
folder and then get a correspondingly different error message pointing to
being unable to load from that folder.

My .bat to run deployer looked like this in the last attempt:

set javaPath=C:\Program Files\Java\jre1.6.0_02

set path=%javaPath%\bin;%path%

echo path is "%path%"

set CLASSPATH=C:\General Filing\P\Postgres\plJava\install
stuff\deploy.jar;C:\General Filing\P\Postgres\plJava\install
stuff\postgresql-8.2-505.jdbc3.jar

echo classpath is "%CLASSPATH%"

"%javaPath%\bin\java.exe" -cp "%CLASSPATH%"
org.postgresql.pljava.deploy.Deployer -install -database pkb -user postgres
-password pwd

Pause

I also looked at:

* http://gborg.postgresql.org/pipermail/pljava-dev/2007/001063.html
* http://gborg.postgresql.org/project/pljava/bugs/bugupdate.php?1653
*
file://///Hillhouseserver/general%20filing/P-Q/Postgres/plJava/install%20stu
ff/docs/userguide.html#Utilities
<file:///\\Hillhouseserver\general%20filing\P-Q\Postgres\plJava\install%20st
uff\docs\userguide.html#Utilities>

It looks like others have had the same problem but there's no solution
posted.

I've also tried compiling the Deployer client side Java code with NetBeans
5.5 and stepping through that. It fails on the CREATE FUNCTION described
above in the same way.

By the way I've been using Java for ten years and Postgres off and on for
at least 5 !

So this must be a really stupid problem.

Help very welcome !!

Regards

David Gradwell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20070906/34247d37/attachment.html>

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Dmitry Ruban 2007-09-06 20:37:01 [Pljava-dev] could not load library "C:/Program Files/PostgreSQL/8.2/lib/pljava.dll" when running deployer on Windows
Previous Message Kris Jurka 2007-08-31 21:36:11 [Pljava-dev] Building from source for PG 8.2.4