Hey,
I'm trying to setup ActiveJDBC instrumentation in Intellij IDEA, but although I performed all of the steps from the instruction, I can't get it to work.
In my pom.xml I have the plugin enabled:
<build>
<plugins>
<plugin>
<groupId>org.javalite</groupId>
<artifactId>activejdbc-instrumentation</artifactId>
<version>1.4.9</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>Then I have created two tryout models that correspond with tables in my database: Client (to table "clients") and SiteUrl (to table "site_urls").
I have also enabled instrumentation as Maven goal after Make in default configuration for JUnit. Actually, it seems it runs fine:
**************************** START INSTRUMENTATION ****************************
Directory: /home/k-/Idea Projects/project/project/target/classes
**************************** END INSTRUMENTATION ****************************
**************************** START INSTRUMENTATION ****************************
Directory: /home/k-/Idea Projects/project/project/target/test-classes
Found model: package.persistance.Client
Found model: package.persistance.SiteUrl
Instrumented class: package.persistance.Client in directory: /home/k-/Idea%20Projects/project/project/target/classes/
Instrumented class: package.persistance.SiteUrl in directory: /home/k-/Idea%20Projects/project/project/target/test-classes/
**************************** END INSTRUMENTATION ****************************But when I try to execute the following code, I get error:
public class FirstTests
{
@Test
public void saveTest() {
Base.open("com.mysql.jdbc.Driver", "jdbc:mysql://127.0.0.1/test_db", "root", "");
Assert.assertTrue(Base.hasConnection());
Client c = new Client();
c.set("name", "client 1");
c.saveIt();
}
}The error is:
org.javalite.activejdbc.DBException: failed to determine Model class name, are you sure models have been instrumented?I can't figure out what might be wrong and how could I go about fixing it?