Hi,
i want to use a trigger. I have a JUnit test class in my eclipse project where i open a connection to the h2 database file and query tables and so on. In the same package as the JUnit test class i have a public class implementing the Trigger interface.
The connection url to the database file is something like "jdbc:h2:file:....".
The h2 jar is on the eclipse classpath. The h2 database file is in a sub-folder of the eclipse project: src/test/resources/...
When i create the trigger with
stmt.execute("create trigger TEST.trxxx after insert on TEST.TABLE_T1 for each row call \""+TestTrigger.class.getName()+"\"");
i get an class-not-found exception.
Class ""....test.H2Test$TestTrigger"" not found [90086-196]"
I tried several things but i do not understand what is meant with "
The class must be available in the classpath of the database engine
".
It would be very nice if someone have a little hint how the classpath of the database engine can be set. it seems to be not the classpath of the eclipse project.
Greetings,
Lian