[Pljava-dev] Problem with PL/Java installation

From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Problem with PL/Java installation
Date: 2006-01-25 07:11:28
Message-ID: 43D724A0.7030407@tada.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pljava-dev

Patrick,
Download the source bundle. You'll find some examples there that you can
try out. There's a special make target 'test_all' that will create the
tests. Also read the secion "Run the example tests" in
http://gborg.postgresql.org/project/pljava/genpage.php?readme

The user guide
http://gborg.postgresql.org/project/pljava/genpage.php?userguide is of
course also a good source for information.

Regards,
Thomas Hallgren

Patrick Ng wrote:
> Hey,
>
> Thanks a lot for the explanation. It sure out things in very clear
> perspective.
>
> Anyway, I was running the client and server within the same PC so the
> settings for CLASSPATH and PATH didn't really matter (but still, the
> explanation above makes me see things in a different light)
>
> I took all the ORACLE stuff out from the PATH setting. It worked.
>
> Thanks a lot.
>
> Btw : I am new to PL/Java. Can you point me to some site /book where
> there are examples that show PL/Java in PostgreSQL in action.
>
> Thanks alot
>
> -----Original Message-----
> From: Thomas Hallgren [mailto:thomas at tada.se]
> Sent: Tuesday, January 24, 2006 5:50 PM
> To: Patrick Ng
> Cc: pljava-dev at gborg.postgresql.org
> Subject: Re: [Pljava-dev] Problem with PL/Java installation
>
> Patrick,
> There are normally two accounts involved, your client account that
> executes the command at the DOS prompt and the account that runs the
> PostgreSQL postmaster service (or standalone process depending on your
> configuration).
>
> The two accounts need different settings. I guess the settings that you
> echo are only related to the first account (client).
>
> The client account should not have a CLASSPATH that includes pljava.jar
> since the classes contained therein are solely for execution in the
> server. The PATH of the client account should not include the <jre
> home>\bin\client and <jre home>\bin paths. Those are only used by the
> server.
>
> The server account should normally not have a CLASSPATH at all besides
> the one noted in your postgresql.conf file.
> The PATH setting of the server account is the one that must include <jre
>
> home>\bin\client and <jre home>\bin paths.
>
> I would strongly advice you to remove any references to the Oracle jre
> from both PATH's.
>
> Finally, verify that your server account have permission to execute the
> libpljava.dll.
>
> Regards,
> Thomas Hallgren
>
>
> Patrick Ng wrote:
>
>> Hi,
>>
>>
>>
>> The settings in my postgresql.conf is as follows :
>>
>>
>>
>> pljava.classpath='C:\\PostgreSQL\\share\\pljava\\pljava.jar'
>>
>>
>>
>> dynamic_library_path = '$libdir;C:\\PostgreSQL\\lib'
>>
>>
>>
>> Here is the error that I got at DOS command prompt :
>>
>>
>>
>> C:\>java org.postgresql.pljava.deploy.Deployer -install -database
>> metaphysics -u
>>
>> ser postgres -password pncs6601
>>
>> org.postgresql.util.PSQLException: ERROR: could not load library
>> "C:/PostgreSQL/
>>
>> lib/libpljava.dll": Access is denied.
>>
>>
>>
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
>>
>> ecutorImpl.java:1512)
>>
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
>>
>> Impl.java:1297)
>>
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
>>
>> va:188)
>>
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
>>
>> ement.java:430)
>>
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
>>
>> Jdbc2Statement.java:332)
>>
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
>>
>> ement.java:324)
>>
>> at
>> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:
>>
>> 432)
>>
>> at
>>
> org.postgresql.pljava.deploy.Deployer.main(Deployer.java:275)
>
>>
>>
>> C:\>echo %CLASSPATH%
>>
>>
>>
> C:\PostgreSQL\share\pljava\deploy.jar;C:\PostgreSQL\jdbc\postgresql-8.1-
> 404.jdbc
>
>> 2.jar;C:\PostgreSQL\share\pljava\pljava.jar
>>
>>
>>
>> C:\>echo %PATH%
>>
>>
>>
> D:\Oracle\product\10.1.0\Client_1\bin;D:\Oracle\product\10.1.0\Client_1\
> jre\1.4.
>
>>
> 2\bin\client;D:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\WINDOWS\
> system32
>
>> ;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
>> Files\Java\jre1.5.0_06\bin\clien
>>
>> t;C:\Program Files\Java\jre1.5.0_06\bin;C:\PostgreSQL\bin
>>
>>
>>
>>
>>
>> Could you advise what went wrong ?
>>
>>
>>
>> Best regards
>>
>>
>>
>> Patrick
>>
>>
>>
>>
>>
> ------------------------------------------------------------------------
>
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>>
>>
>
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System.
>

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2006-02-01 14:21:59 [Pljava-dev] PL/Java on HP-UX
Previous Message Patrick Ng 2006-01-25 02:25:01 [Pljava-dev] Problem with PL/Java installation