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
4

1 回答 1

1

您需要使用父/子 Maven 设置。请在此处查看完整答案:https ://github.com/javalite/activejdbc/issues/392

于 2015-03-24T07:24:12.587 回答