List<ModelField> fList = ModelField.dao.getByModelId(144);
System.out.println(fList.size());
这段代码在其他函数体里是可以调用的也不会抛出异常,但是我将这段代码放到mian方法里运行就会报错了,求解!!!!!
异常如下:
Exception in thread "main" java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:595)
at com.idata.bd.model.dt.ModelField.getByModelId(ModelField.java:107)
at com.idata.bd.controller.dt.MasterDataController.main(MasterDataController.java:805)