0

How do one setup the ActiveJDBC instrumentation step on a quarkus project?

The instrumentation plugin is setup in pom.xml, and can be run successfully manually or via IDE.

    <plugin>
        <groupId>org.javalite</groupId>
        <artifactId>activejdbc-instrumentation</artifactId>
        <version>3.4-j11</version>
        <executions>
          <execution>
            <phase>process-classes</phase>
            <goals>
              <goal>instrument</goal>
            </goals>
          </execution>
        </executions>
    </plugin>

But the instrumented model classes are not recognized after running 'quarkus dev' or 'mvn quarkus:dev'

org.javalite.activejdbc.InitException: you are trying to work with models, but no models are found. Maybe you have no models in project, or you did not instrument the mode
ls. It is expected that you have a file activejdbc_models.properties on classpath
        at org.javalite.activejdbc.ModelFinder.getModelsForDb(ModelFinder.java:92)
        at org.javalite.activejdbc.Registry.init(Registry.java:127)
        at org.javalite.activejdbc.Registry.getMetaModel(Registry.java:101)
        at org.javalite.activejdbc.ModelDelegate.metaModelOf(ModelDelegate.java:273)
        at org.javalite.activejdbc.ModelDelegate.findAll(ModelDelegate.java:178)

Quarkus 3.1.2.Final, ActiveJDBC 3.4-j11, lombok 1.18.28.

  • Can you please provide more information about your project structure? Maybe you have a simple example you can share? – ipolevoy Aug 13 '23 at 15:26
  • I uploaded a small sample app to a private github repo. How should i share it with you? – Sugiharto Lim Aug 18 '23 at 18:57
  • we already built a project, played with Quarkus, and reproduced this issue. It is related to the Quarkus' ability to hot-reload/recompile classes. Basically, Quarkus reloads model classes from code and recompiles them, hence blowing away instrumentation. We are still looking at the best ways to merry Quarkus and ActiveJDBC. We will be filing an issue with the Quarkus Github project too. Once we have a solution, we will post it here. We are actively looking at this issue. – ipolevoy Aug 19 '23 at 23:31
  • we filed an issue with Quarkus: https://github.com/quarkusio/quarkus/issues/35418. If they do not respond, we still have some ideas, stay tuned. – ipolevoy Aug 20 '23 at 19:36

0 Answers0