Ebean DAO can't inject into a extends class of ActAAAService.Base with normal start.
To prevent start up failed, need to add @Lazy to extends class of ActAAAService.Base to make sure the ebean dao finish initialization.
Exception:
2017-08-11 14:46:36,053 DEBUG [XNIO-1 I/O-1] [org.xnio.nio] - Started channel thread 'XNIO-1 I/O-1', selector sun.nio.ch.WindowsSelectorImpl@2d99a2e0
2017-08-11 14:46:36,054 WARN [jobs-thread-1] [act.job._Job] - error executing job register-singleton-instances
org.osgl.inject.InjectException: cannot instantiate class cc.bable.nexus.service.SecurityService
at org.osgl.inject.Genie$7.get(Genie.java:757)
at org.osgl.inject.Genie$5.get(Genie.java:689)
at org.osgl.inject.Genie.get(Genie.java:316)
at act.inject.genie.GenieInjector.get(GenieInjector.java:76)
at act.app.App.getInstance(App.java:866)
at act.app.SingletonRegistry.doRegister(SingletonRegistry.java:77)
at act.app.SingletonRegistry.access$000(SingletonRegistry.java:34)
at act.app.SingletonRegistry$1.run(SingletonRegistry.java:50)
at act.job._Job$2.apply(_Job.java:310)
at act.job._Job.doJob(_Job.java:272)
at act.job._Job.run(_Job.java:212)
at act.job.AppJobManager$ContextualJob$1.apply(AppJobManager.java:371)
at act.job._Job.doJob(_Job.java:272)
at act.job._Job.run(_Job.java:212)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.osgl.inject.Genie$7.get(Genie.java:737)
... 20 common frames omitted
Caused by: java.lang.NullPointerException: null
at act.db.ebean2.EbeanDao.setEbean(EbeanDao.java:98)
at act.db.ebean2.EbeanDao.<init>(EbeanDao.java:49)
at act.db.ebean2.EbeanService.defaultDao(EbeanService.java:107)
at act.app.DbServiceManager.dao(DbServiceManager.java:171)
at act.aaa.ActAAAService$Base.initUserDao(ActAAAService.java:298)
at act.aaa.ActAAAService$Base.initUserType(ActAAAService.java:290)
at act.aaa.ActAAAService$Base.<init>(ActAAAService.java:53)
at cc.bable.nexus.service.SecurityService.<init>(SecurityService.java:16)
... 25 common frames omitted
Ebean DAO can't inject into a extends class of ActAAAService.Base with normal start. To prevent start up failed, need to add @Lazy to extends class of ActAAAService.Base to make sure the ebean dao finish initialization.
Exception: