trigger problem in calling java external procedure

trigger problem in calling java external procedure

Post by Judg » Fri, 24 May 2002 13:01:04



hi all,

I have created a trigger that calls to the java external routine. The
trigger looks like below:

CREATE OR REPLACE TRIGGER upd_notify_trigger
  AFTER UPDATE OR INSERT OR DELETE ON "resources"
    FOR EACH ROW
    BEGIN
      IF DELETING THEN
          call udp_notify (:OLD."resource_id",
                          :OLD."type",
                          :OLD."x",
                          :OLD."y",
                          :OLD."z",
                          :OLD."speed",
                          :OLD."bearing");
      ELSE
          call udp_notify (:NEW."resource_id",
                          :NEW."type",
                          :NEW."x",
                          :NEW."y",
                          :NEW."z",
                          :NEW."speed",
                          :NEW."bearing");

      END IF;
    END;
/              

When I execute the above script I got the error "trigger created with
compilation errors".

If I remove the keywords "call" from the above script the trigger is
created and compilation was successful (note: I am calling to a
procedure not function). But when I update the database I got this
error "ORA-04098: trigger 'TEST_USER.UDP_NOTIFY_TRIGGER' is invalid
and failed re-validation.

Could any one help me fix the problem? I have tried everything I think
would work with no success.

thanks in advance....

best regards,
judge

 
 
 

1. Java stored procedure and calls to external JDBC source

OK, I want to select a value from a remote database (mysql) from within an
oracle sqlj procedure. The procedure works fine from within jdeveloper, and
deploys with no (apparent) problems, but when I come to use the function
that I mapped to the procedure from within sql plus, I get a null response,
and no network activity to suggest that the remote database was being
queried.

I'm using the 2.0pre5  mysql driver, oracle 8.1.6.

Some questions:

1) Am I wrong in assuming any java runtime exceptions would be directed to
the
console? i this isn't the case.. where can they be found?
2) Do I need to grant specific permissions to allow classes within the
Server JVM to make outgoing socket connections?
3) (this is a more general question) is there any shared context that I can
use to create a connection pool,
or objects shared across multiple function calls?

Any help appreciated

Thanks

JB.

2. Data replication configuration

3. calling and passing data from database to the external procedures written in C,C++ or java

4. **FREE EDUCATION

5. External Call From Stored Procedure/Trigger

6. Oracle DBA Needed in Florida ..by A Great Company!

7. Calling external programs from triggers/stored procedure

8. SQLTrace.xls file read problems

9. Calling external C procedure from a trigger

10. Gettting SQL0751N trying to call java stored procedure from a java stored procedure

11. Calling a Java Stored Procedure from another Java Stored Stored Procedure

12. Calling Java from a stored procedure (or) trigger.

13. pl/sql external procedure call problem