0

I'm 80% sure the problem I'm having is because of instrumentation.

So I have a project(A), that uses project(B) as its maven dependency.

Project B uses activejdbc.

Running mvn process-classes on project A does not appear to instrument the tables for Project B.

It gives me the following error. I can verify that the constructor is indeed there, despite what it says.

Exception in thread "main" org.javalite.activejdbc.InitException: Model 'com.xxx.xx.Tables$Currency' must provide a default constructor. Table:
    at org.javalite.activejdbc.Model.create(Model.java:2143)
    at org.javalite.activejdbc.Model.createIt(Model.java:2181)
    at com.xxx.xx.Tables$Currency.createIt(Tables.java:2178)
Caused by: java.lang.NullPointerException
    at org.javalite.activejdbc.Model.setRaw(Model.java:234)
    at org.javalite.activejdbc.Model.set(Model.java:224)
    at org.javalite.activejdbc.ModelDelegate.setNamesAndValues(ModelDelegate.java:52)
    at org.javalite.activejdbc.Model.create(Model.java:2137)
    ... 8 more
dessalines
  • 6,352
  • 5
  • 42
  • 59

1 Answers1

1

You need to use parent/child Maven setup. Please, see a full answer here: https://github.com/javalite/activejdbc/issues/392

ipolevoy
  • 5,432
  • 2
  • 31
  • 46