I have a scala file has been compiled with the following command:
scalac -cp ".:*" AcmeTrigger.scala
In the directory with the .scala
file I have some .jar
files that contain the APIs for email and texting services that I'm using. No issues here.
The scala file essentially sends text messages and emails when someone modifies a table in a database. I start the database with the following command:
java -cp ".:*" -jar h2-1.4.182.jar
Essentially telling it to use the the .class
and .jar
files in directory and add them to the classpath. I've done many variations of this. Without .class, with ".:*" with the fully typed name. No matter what I do, H2 doesn't recognize the class.
So there's an operation in this database that connects the database to a class:
CREATE TRIGGER ALERT AFTER INSERT ON "event"
FOR EACH ROW CALL "AcmeTrigger"
When I run this I get an error that states it cannot find the class:
Error creating or initializing trigger "ALERT" object, class "AcmeTrigger", cause: "org.h2.message.DbException: Class ""AcmeTrigger"" not found [90086-182]"
I don't think the error is in the query syntax, but with how I'm using classpath's and was hoping someone with more Java/Scala experience could help me here. I've tried many variations of starting the .jar file but nothing seems to help.