Calling a java function from a trigger

2019-09-12 Thread fkalim
Hi, I'm looking for a clear example on how to call a java function from a trigger based on an inserted row. Any help would be appreciated. I have attached what I have so far. Currently, the error I get is on the the last line of the trigger: org.jooq.exception.DataAccessException: SQL [CREATE

Do triggers block?

2019-09-15 Thread fkalim
Hi, I'm working with triggers in Derby and their order of execution is described in the document as given below. However, I wanted to clarify whether triggers are blocking e.g. if an AFTER trigger fires a function, does it block until the function has finished running? Order of execution When a

Re: Calling a java function from a trigger

2019-09-12 Thread fkalim
Thanks Rick! This is really helpful. How would I let derby know where the compiled classes are placed? In fact, if I am creating the connection to the database in Java, and also creating the tables and triggers programmatically, how do tell derby where the classes are located? -- Sent from:

Re: Calling a java function from a trigger

2019-09-12 Thread fkalim
To give more information, I compile my code into a jar, install the jar and then try to use the Java file in the jar. The name of the java class is TestListener. When I use the sql code below, I get the error: ERROR 42X51: The class 'APP.TestListener' does not exist or is inaccessible. This can

Re: AW: Calling a java function from a trigger

2019-09-13 Thread fkalim
Hi, So I think I was able to figure it out. The listener was in the main source code, whereas the updates to the table were done from the tests. Once I moved the listener to the tests, it worked. Thanks for all your help! -- Sent from:

Re: Calling a java function from a trigger

2019-09-12 Thread fkalim
Thanks! I tried that first and got the following error. It was only after that that I went down this path of trying to set derby.database.classpath. Any ideas would be great! SQL [CREATE TRIGGER extract_keyword_trigger AFTER INSERT ON TEMP REFERENCING NEW AS newTable FOR EACH ROW CALL