I'm trying to use ActiveJDBC's dynamic instrumentation with the -javaagent command-line option in the run configuration of a JUnit test in Intellij IDEA (2018.1 Ultimate). I've entered the following in the "VM Options" input field of the run configuration dialog:
-javaagent:"C:\Users\cschabli\.m2\repository\org\javalite\activejdbc-instrumentation\2.0\activejdbc-instrumentation-2.0.jar" -Dactivejdbc-instrumentation.log=true
After starting the unit test, I get log messages of the ActiveJDBC instrumentation agent like these:
ActiveJDBC Instrumentation - You are using dynamic instrumentation
ActiveJDBC Instrumentation - Found model: foo.bar.MyModel
But when the application code accesses the model class, I get this error message:
org.javalite.activejdbc.InitException: failed to determine Model class name, are you sure models have been instrumented?
Why doesn't this work in IDEA?