[Pljava-dev] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'
Date: 2005-04-13 13:01:19
Message-ID: 425D181F.8090007@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Manos Spanoudakis wrote:

>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 ??
>
>
You seem to do everything just right so I'll try a couple of long-shots:

1. Older versions of PL/Java has a bug that will force you to finish the
installation session and start a new session before the functions will
work properly. Are you using a version prior to 1.0.1?
2. If you list the testtrigger.jar file, is the TestTrigger1.class file
listed there and is it qualified with the package directory in the listing?
3. When you executed the above, did you by any chance execute the actual
update from another session then the one used for the install, and if
so, did you commit the installation?

Regards,
Thomas Hallgren

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Manos Spanoudakis 2005-04-13 15:24:08 [Pljava-dev] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'
Previous Message Manos Spanoudakis 2005-04-13 12:44:29 [Pljava-dev] Error message java.lang.ClassNotFoundException: 'pljavatriggers.TestTrigger1'