1

I'm trying to setup a debug configuration in IntelliJ for a Gradle project that uses ActiveJDBC, and I'm running into an error. In the config, I put a call to run the instrumentModels task, but I still get an instrumentation exception. I switched the build to the Gradle build, followed by the instrumentModel, bit I'm still receiving an exception. Has anyone configured this without Maven?

Delmania
  • 812
  • 10
  • 20

1 Answers1

0

You can use a Gragle plugin: http://javalite.io/instrumentation#gradle-instrumentation-plugin.

If that does not work somehow, you can do similar to: https://github.com/emacadie/my_groovy_apps_001/blob/working/active_jdbc/other.gradle

if that does not work, just follow the guidelines: http://javalite.io/instrumentation#standalone-instrumentation

I can't help you further since you did not provide a single error message in your question.

Update based on a comment:

If you get this exception:

'org.javalite.activejdbc.InitException' exception. failed to determine Model class name, are you sure models have been instrumented?

it means just one thing: the models are not instrumented. So, the question is: how is it possible that they are not instrumented if you saw them being instrumented in front of your eyes? The answer is: sometimes IDEs like to recompile classes (models including), which blows instrumentation away. If you touch a model class, you need to instrument the class files again.

Just watch the video on this page: http://javalite.io/instrumentation it goes over details of this issue.

ipolevoy
  • 5,432
  • 2
  • 31
  • 46
  • 1
    The exception I'm receiving is: [Method threw 'org.javalite.activejdbc.InitException' exception. failed to determine Model class name, are you sure models have been instrumented?] And yes, I used the plugin since that's how I got the instrumentation task. When I watch the build window, I see the instrumentation occur, and in the building folder I see the generated metadata, but when I debug, I get that error. – Delmania Jun 14 '18 at 20:20