引入nutzboot引入beetl做html渲染,在idea下使用application方式启动没有错误,但是打成kar包后用命令启动,报一下错误。
E:\dst> java -jar -Xmx512m -Xms512m -Dfile.encoding=UTF-8 -Dserver.port=9080 JKLT-1.0-SNAPSHOT.jar
445 [main] INFO org.quartz.impl.StdSchedulerFactory - Using default implementation for ThreadExecutor
458 [main] INFO org.quartz.core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
458 [main] INFO org.quartz.core.QuartzScheduler - Quartz Scheduler v.2.3.0 created.
460 [main] INFO org.quartz.simpl.RAMJobStore - RAMJobStore initialized.
461 [main] INFO org.quartz.core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.3.0) 'NutzbootScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 8 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
462 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler 'NutzbootScheduler' initialized from an externally provided properties instance.
462 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler version: 2.3.0
463 [main] INFO org.quartz.core.QuartzScheduler - JobFactory set to: org.nutz.integration.quartz.NutQuartzJobFactory@52f759d7
567 [main] INFO org.eclipse.jetty.util.log - Logging initialized @710ms to org.eclipse.jetty.util.log.Slf4jLog
737 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.28.v20200408; built: 2020-04-08T17:49:39.557Z; git: ab228fde9e55e9164c738d7fa121f8ac5acd51c9; jvm 1.8.0_241-b07
834 [main] WARN org.eclipse.jetty.annotations.AnnotationParser - Unknown ASM version, assuming ASM7
835 [main] INFO org.eclipse.jetty.annotations.AnnotationConfiguration - Scanning elapsed time=0ms
840 [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
848 [main] INFO org.eclipse.jetty.server.session - DefaultSessionIdManager workerName=node0
848 [main] INFO org.eclipse.jetty.server.session - No SessionScavenger set, using defaults
851 [main] INFO org.eclipse.jetty.server.session - node0 Scavenging every 600000ms
1170 [main] ERROR org.nutz.mvc.impl.NutLoading - Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born or cast to 'org.beetl.ext.nutz.BeetlViewMaker'because: java.lang.NullPointerException
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:17)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:1025)
at org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:347)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:164)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
at org.nutz.boot.starter.nutz.mvc.NbMvcLoading.load(NbMvcLoading.java:28)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:134)
at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:749)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:773)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:360)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:838)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:177)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at com.yunjsoft.kingdee.project.JKLT.JKLTMainLauncher.main(JKLTMainLauncher.java:73)
Caused by: java.lang.NullPointerException
at org.beetl.core.misc.BeetlUtil.getWebRoot(BeetlUtil.java:274)
at org.beetl.core.resource.WebAppResourceLoader.<init>(WebAppResourceLoader.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.beetl.core.fun.ObjectUtil.instance(ObjectUtil.java:472)
at org.beetl.core.GroupTemplate.initResourceLoader(GroupTemplate.java:162)
at org.beetl.core.GroupTemplate.<init>(GroupTemplate.java:124)
at org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:90)
at org.beetl.ext.nutz.BeetlViewMaker.<init>(BeetlViewMaker.java:55)
at org.beetl.ext.nutz.BeetlViewMaker$FC$449a379ade26e6b06bdc3bf8808ca6c7.invoke(BeetlViewMaker.java)
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:14)
... 33 more
1270 [main] ERROR org.nutz.mvc.impl.NutLoading - try to depose ioc
1301 [main] WARN org.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@3ad83a66{/,[jar:file:/E:/dst/JKLT-1.0-SNAPSHOT.jar!/static/],UNAVAILABLE}
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born or cast to 'org.beetl.ext.nutz.BeetlViewMaker'because: java.lang.NullPointerException
at org.nutz.mvc.LoadingException$FC$fe439f89091e46ca0f7988383224110b.invoke(LoadingException.java)
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:1025)
at org.nutz.lang.Lang.wrapThrow(Lang.java:207)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
at org.nutz.boot.starter.nutz.mvc.NbMvcLoading.load(NbMvcLoading.java:28)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:134)
at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:749)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:773)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:360)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:838)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:177)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at com.yunjsoft.kingdee.project.JKLT.JKLTMainLauncher.main(JKLTMainLauncher.java:73)
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'org.beetl.ext.nutz.BeetlViewMaker'because: java.lang.NullPointerException
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:17)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:1025)
at org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:347)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:164)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
... 28 more
Caused by: java.lang.NullPointerException
at org.beetl.core.misc.BeetlUtil.getWebRoot(BeetlUtil.java:274)
at org.beetl.core.resource.WebAppResourceLoader.<init>(WebAppResourceLoader.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.beetl.core.fun.ObjectUtil.instance(ObjectUtil.java:472)
at org.beetl.core.GroupTemplate.initResourceLoader(GroupTemplate.java:162)
at org.beetl.core.GroupTemplate.<init>(GroupTemplate.java:124)
at org.beetl.ext.nutz.BeetlViewMaker.init(BeetlViewMaker.java:90)
at org.beetl.ext.nutz.BeetlViewMaker.<init>(BeetlViewMaker.java:55)
at org.beetl.ext.nutz.BeetlViewMaker$FC$449a379ade26e6b06bdc3bf8808ca6c7.invoke(BeetlViewMaker.java)
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:14)
... 33 more
1459 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@4313f5bc{HTTP/1.1, (http/1.1)}{127.0.0.1:8081}
1460 [main] INFO org.eclipse.jetty.server.Server - Started @1604ms
1462 [main] INFO org.quartz.core.QuartzScheduler - Scheduler NutzbootScheduler_$_NON_CLUSTERED started.
1468 [main] ERROR org.nutz.boot.NbApp - something happen!!
java.lang.RuntimeException: Context 'app' had been deposed!
at org.nutz.lang.Lang.makeThrow(Lang.java:139)
at org.nutz.ioc.impl.ScopeContext.checkBuffer(ScopeContext.java:39)
at org.nutz.ioc.impl.ScopeContext.fetch(ScopeContext.java:55)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:180)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
at org.nutz.boot.starter.quartz.QuartzStarter.start(QuartzStarter.java:74)
at org.nutz.boot.AppContext.startServers(AppContext.java:310)
at org.nutz.boot.NbApp.execute(NbApp.java:210)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at com.yunjsoft.kingdee.project.JKLT.JKLTMainLauncher.main(JKLTMainLauncher.java:73)
1492 [main] INFO org.eclipse.jetty.server.AbstractConnector - Stopped ServerConnector@4313f5bc{HTTP/1.1, (http/1.1)}{127.0.0.1:8081}
1493 [main] INFO org.eclipse.jetty.server.session - node0 Stopped scavenging
1497 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext@3ad83a66{/,[jar:file:/E:/dst/JKLT-1.0-SNAPSHOT.jar!/static/],UNAVAILABLE}
1512 [main] INFO org.quartz.core.QuartzScheduler - Scheduler NutzbootScheduler_$_NON_CLUSTERED shutting down.
1512 [main] INFO org.quartz.core.QuartzScheduler - Scheduler NutzbootScheduler_$_NON_CLUSTERED paused.
1951 [main] INFO org.quartz.core.QuartzScheduler - Scheduler NutzbootScheduler_$_NON_CLUSTERED shutdown complete.