agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'
Date: Wed, 13 Apr 2005 15:44:29 +0300
Message-ID: <000b01c54026$8be12450$0301a8c0@manos> (raw)

Dear *,

I am trying to compose a Trigger using pljava and I am getting the error
message:
java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'

Here are the steps I followed: 

1) I created the TestTrigger1.java (belongs to package pljavatriggers..)
file and created testtrigger.jar in the directory 
d:\pljavatriggers.
2) Then I created the trigger function with the following code

CREATE OR REPLACE FUNCTION sqlj.testfunction()
  RETURNS "trigger" AS
$BODY$ 'pljavatriggers.TestTrigger1.execCommandLine'$BODY$
  LANGUAGE 'javau' VOLATILE;
ALTER FUNCTION sqlj.testfunction() OWNER TO xristis;
GRANT EXECUTE ON FUNCTION sqlj.testfunction() TO xristis;
GRANT EXECUTE ON FUNCTION sqlj.testfunction() TO public;

3) The trigger was created 

CREATE TRIGGER test_trigger
  AFTER INSERT OR UPDATE
  ON sqlj."Doctor"
  FOR EACH STATEMENT
  EXECUTE PROCEDURE sqlj.testfunction();

4) The jar was installed and it was added to classpath... SELECT
sqlj.install_jar('file:D:\\pljavatriggers\\testtrigger.jar','testtrigger',tr
ue);
SELECT sqlj.set_classpath('sqlj','testtrigger');

With no error messages...

When I try to execute an SQL Update query I get the error message
java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1' as mentioned
before

Can anyone tell me what I am missing ?? 

Thanx,
Manos






view thread (6+ messages)  latest in thread

Message-ID: <000b01c54026$8be12450$0301a8c0@manos>
Permalink:  ../000b01c54026$8be12450$0301a8c0@manos/
Also on:    postgresql.org/message-id/000b01c54026$8be12450$0301a8c0@manos

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] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'
  In-Reply-To: <000b01c54026$8be12450$0301a8c0@manos>

* 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