agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] java.lang.ClassNotFoundException: org.postgresql.pljava.example.Users
Date: Thu, 31 Mar 2005 20:18:53 +0200
Message-ID: <424C3F0D.4020906@mailblocks.com> (raw)
In-Reply-To: <BAY12-F42CDF477041D793D1B079A6470@phx.gbl>
References: <BAY12-F42CDF477041D793D1B079A6470@phx.gbl>
Antonio Carlos de Andrade Brito wrote:
> Hi... How can i to run the listSupers() function that is write at
> userguide ?
> When i type select listSupers() the follow message is showed "
> java.lang.ClassNotFoundException: org.postgresql.pljava.example.Users,".
> And i try set examples.jar, at Classpath bus doens?t working...
> I just to run the example:
>
> " CREATE FUNCTION getsysprop(VARCHAR)
> RETURNS VARCHAR
> AS 'java.lang.System.getProperty'
> LANGUAGE java;
>
> SELECT getsysprop('user.home');"
>
> This function is working ok!
>
> Please, help me...
> Antonio Carlos
>
> My enviromment
>
> CLASSPATH=
> %CLASSPATH%;deploy.jar;..\jdbc\postgresql-8.0.309.jdbc2.jar;pljava.jar;C:\Arquivos
>
> de programas\PostgreSQL\8.0\pljava\examples.jar
>
> PATH=
> C:\j2sdk1.4.2_05\bin;C:\j2sdk1.4.2_05\jre\bin\client;
>
You need to load the examples.jar into the database using
sqlj.install_jar. Start psql and enter the following commands:
SELECT
sqlj.install_jar('file:/C:/Arquivos%20de%20programas/PostgreSQL/8.0/examples.jar',
'samples', true);
SELECT sqlj.set_classpath('public', 'samples');
That should do it but you should adjust your CLASSPATH also. The
PostgreSQL backend (the postmaster) should see a CLASSPATH where *only*
the pljava.jar is listed. Since you use a 8.0, you can set this
classpath in the postgresql.conf file. The client programs you use
should *never* see the pljava.jar and they don't need to see
examples.jar since it's loaded into the database. So, in
postgresql.conf, enter:
custom_variable_classes = 'pljava'
pljava.classpath = '<full path to pljava.jar>'
The full path must use escaped backslashes, i.e. '\\' since
postgresql.conf will treat backslash as an escape in itself.
Regards,
Thomas Hallgren
view thread (6+ messages) latest in thread
Message-ID: <424C3F0D.4020906@mailblocks.com>
Permalink: ../424C3F0D.4020906@mailblocks.com/
Also on: postgresql.org/message-id/424C3F0D.4020906@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] java.lang.ClassNotFoundException: org.postgresql.pljava.example.Users
In-Reply-To: <424C3F0D.4020906@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