actframework / act-ebean

The ebean plugin that uses latest ebeanorm and requrie java 8 support
Apache License 2.0
2 stars 1 forks source link

NPE raised starting app in prod mode when no third part datasource defined #7

Closed greenlaw110 closed 7 years ago

greenlaw110 commented 7 years ago

Error stack

Exception in thread "main" java.lang.NullPointerException
    at org.osgl.util.E.NPE(E.java:56)
    at org.osgl.Osgl.notNull(Osgl.java:5052)
    at act.db.ebean2.EbeanDao.ebean(EbeanDao.java:63)
    at act.db.ebean2.EbeanDaoInjectionListener$1.on(EbeanDaoInjectionListener.java:43)
    at act.event.EventBus.callOn(EventBus.java:230)
    at act.event.EventBus.callOn(EventBus.java:254)
    at act.event.EventBus.callOn(EventBus.java:275)
    at act.event.EventBus.emit(EventBus.java:296)
    at act.event.EventBus.emit(EventBus.java:284)
    at act.app.App.emit(App.java:828)
    at act.app.App.refresh(App.java:588)
    at act.app.AppManager.load(AppManager.java:83)
    at act.app.AppManager$_F$1.visit(AppManager.java:155)
    at act.app.AppManager$_F$1.visit(AppManager.java:151)
    at org.osgl.Osgl$Visitor.apply(Osgl.java:2226)
    at org.osgl.Osgl$Visitor.apply(Osgl.java:2216)
    at act.app.AppScanner.scan(AppScanner.java:94)
    at act.app.AppScanner.scan(AppScanner.java:74)
    at act.app.AppManager.loadSingleApp(AppManager.java:61)
    at act.Act.start(Act.java:319)
    at act.Act.startApp(Act.java:290)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at act.boot.app.RunApp.start(RunApp.java:84)
    at act.boot.app.RunApp.start(RunApp.java:62)
    at com.techempower.act.AppEntry.main(AppEntry.java:39)

Note this error doesn't triggered when running app in dev mode

greenlaw110 commented 7 years ago

Fixed in 1.1.0