You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding jackson as a dependency of the buildscript resolves the issue. Since the error is ClassNotFoundException the plugin must not be setting up the classpath passed to the instrumentation correctly: it is using the build classpath and not the project classpath.
@ipolevoy , I propose to close this issue since I'm not able to reproduce it with ActiveJDBC 2.3.1-j8 and the latest version of the activejdbc-gradle-plugin.
The mentioned example works because the jackson dependency is now a transitive dependency of activejdbc-2.3.1-j8 and therefore it is on the classpath of the grade-plugin. I tried to reference other 3rd party libraries (Apache commons-lang3, javax.validation API) in activejdbc model classes. But they didn't cause to break the model instrumentation by the gradle plugin.
Instrumentation via the gradle plugin will fail if the
Model
subclass being instrumented has annotations from another (non-activejdbc) dependency.Example: jasoma/activejdbc-gradle@b0be2e0
Here
@JsonSerialize
has been added to theEmployee
class with no other changes. The build will fail as follows:Work around: jasoma/activejdbc-gradle@e41bc95
Adding jackson as a dependency of the buildscript resolves the issue. Since the error is
ClassNotFoundException
the plugin must not be setting up the classpath passed to the instrumentation correctly: it is using the build classpath and not the project classpath.NOTE: The maven plugin does not suffer from the same issue: https://github.com/jasoma/simple-example/tree/jackson-test
The text was updated successfully, but these errors were encountered: