Jetty启动报错JFinal2.0

2017-08-09 17:49:56.544:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.NullPointerException

java.lang.NullPointerException

at com.yy.common.YyConfig.configHandler(YyConfig.java:129)

at com.jfinal.core.Config.configJFinal(Config.java:50)

at com.jfinal.core.JFinal.init(JFinal.java:65)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)

at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:114)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:754)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)

at org.eclipse.jetty.server.Server.doStart(Server.java:263)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at runjettyrun.Bootstrap.main(Bootstrap.java:80)

2017-08-09 17:49:56.545:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,[file:/C:/Users/yygz51/git/yy-webmagic/yy-webmagic/src/main/webapp/]}

java.lang.NullPointerException

at com.yy.common.YyConfig.configHandler(YyConfig.java:129)

at com.jfinal.core.Config.configJFinal(Config.java:50)

at com.jfinal.core.JFinal.init(JFinal.java:65)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)

at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:114)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:754)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)

at org.eclipse.jetty.server.Server.doStart(Server.java:263)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)

at runjettyrun.Bootstrap.main(Bootstrap.java:80)

2017-08-09 17:49:56.552:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8081


评论区

JFinal

2017-08-09 18:00

找到异常的 cause 信息指向的那个类的那一行代码,设置一个断点调试一下立即就可以解决

Null Pointer Exception 这种异常没有多少可以回复的空间了

JFinal

2017-08-09 18:01

YyConfig.java 第 129 行,有个对象是 null,但你调用了这个 null 上的方法,所以会有这个异常

shuchang

2017-08-09 18:31

@JFinal 有个项目用了JFinal,改动了一点点出了这个问题,还是个Java菜鸟 谢谢指导,我看看解决再说

shuchang

2017-08-09 18:38

@JFinal 找到原因了,产生了些错误数据导致空错误了。

热门反馈

扫码入社