[Pljava-dev] Pl/JAVA Windows XP

Lists: pljava-dev
From: deamorim2 at hotmail(dot)com (Alexandre Teixeira)
To:
Subject: [Pljava-dev] Pl/JAVA Windows XP
Date: 2011-02-18 16:21:16
Message-ID: BLU149-W355BD4CED6BCC8C01C6B8EE9D40@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev


Hi there,

I'm trying to install PL/JAVA in windows XP and I tryed all the possibles variations, from PostgreSQL 8.1 to 9.0 and JDK 1.4 to 6.
I succced in creating sqlj scheme but it gives me an error when I try to run the PL/Java sample tests. It takes 3 seconds processing and after this it crashes with this message: "********** Erro **********".
I'm using PostgreSQL 8.3 and jdk1.5.0_22. I tryed PLJAVA that is included in the postgres installation and the pljava-i686-pc-mingw32-pg8.3-1.4.0 PLJAVA instalation.

Here is my configuration for:

PATH=C:\Program Files\Java\jdk1.5.0_22\lib;C:\Program Files\Java\jdk1.5.0_22\bin;C:\Program Files\Java\jdk1.5.0_22\jre\bin\client;C:\Program Files\Java\jdk1.5.0_22\jre\bin;C:\Program Files\PostgreSQL\8.3\bin;c:\Program Files\PostgreSQL\8.3\lib;C:\Program Files\PostgreSQL\8.3\share\pljava

postgresql.conf file:

custom_variable_classes = 'pljava'
pljava.classpath = 'C:\\Program Files\\PostgreSQL\\8.3\\share\\pljava\\pljava.jar'
pljava.statement_cache_size = 10
pljava.release_lingering_savepoints = true
pljava.vmoptions = '-Xmx64M'
pljava.debug = false
dynamic_library_path = '$libdir;C:\\Program Files\\PostgreSQL\\8.3\\share\\pljava'
log_min_messages = info

CLASSPATH:
C:\Program Files\PostgreSQL\8.3\jdbc\postgresql-8.3-606.jdbc4.jar;C:\Program Files\PostgreSQL\8.3\share\pljava\deploy.jar

I use this command in prompt to create the sqlj scheme:

C:\>java -cp "C:\Program Files\PostgreSQL\8.3\share\pljava\deploy.jar;C:\Program Files\PostgreSQL\8.3\jdbc\postgresql-8.3-606.jdbc4.jar" org.postgresql.pljava.deploy.Deployer -install -user postgres -database teste -password postgres

This is the command to run the PL/Java sample tests

SELECT sqlj.install_jar('C:/Program Files/PostgreSQL/8.3/share/pljava/examples.jar', 'samples', true);

Thanks for the attention,

Alex


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20110218/5dfb4657/attachment.html>


From: johann at 2ndquadrant(dot)com (Johann 'Myrkraverk' Oskarsson)
To:
Subject: [Pljava-dev] Pl/JAVA Windows XP
Date: 2011-02-19 01:02:58
Message-ID: op.vq4k68rtuxs6vk@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi Alexandre,

On Fri, 18 Feb 2011 16:21:16 -0000, Alexandre Teixeira
<deamorim2 at hotmail.com> wrote:

> I'm trying to install PL/JAVA in windows XP and I tryed all the
> possibles variations, from PostgreSQL 8.1 to 9.0 and JDK 1.4 to 6.
> I succced in creating sqlj scheme but it gives me an error when I try to
> run the PL/Java sample tests. It takes 3 seconds processing and after
> this it crashes with this message: "********** Erro **********".
> I'm using PostgreSQL 8.3 and jdk1.5.0_22. I tryed PLJAVA that is
> included in the postgres installation and the
> pljava-i686-pc-mingw32-pg8.3-1.4.0 PLJAVA instalation.

What exactly are you doing that fails? Can you give us the steps that
reproduce the error for you?

> This is the command to run the PL/Java sample tests
>
> SELECT sqlj.install_jar('C:/Program
> Files/PostgreSQL/8.3/share/pljava/examples.jar', 'samples', true);

Did that succeed? Does

CREATE FUNCTION f(TEXT) RETURNS TEXT AS
'java.lang.System.getProperty' LANGUAGE JAVA;

SELECT f( 'user.home' );

work?

--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/