2014-11-22 11:56:15.628:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.NullPointerException
java.lang.NullPointerException
at com.jfinal.plugin.activerecord.ModelRecordElResolver.init(ModelRecordElResolver.java:46)
at com.jfinal.render.RenderFactory.initJspRender(RenderFactory.java:112)
at com.jfinal.render.RenderFactory.init(RenderFactory.java:68)
at com.jfinal.core.JFinal.initRender(JFinal.java:121)
at com.jfinal.core.JFinal.init(JFinal.java:72)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.main(JFinal.java:173)
2014-11-22 11:56:15.644:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/F:/works/app/WebRoot/}
java.lang.NullPointerException
at com.jfinal.plugin.activerecord.ModelRecordElResolver.init(ModelRecordElResolver.java:46)
at com.jfinal.render.RenderFactory.initJspRender(RenderFactory.java:112)
at com.jfinal.render.RenderFactory.init(RenderFactory.java:68)
at com.jfinal.core.JFinal.initRender(JFinal.java:121)
at com.jfinal.core.JFinal.init(JFinal.java:72)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.main(JFinal.java:173)
可能是运行环境的问题,去jfinal官网下载最新版本jar包进行替换 <atarget="_blank"rel="nofollow">http://www.jfinal.com ,搞定后别忘了回来分享。回复<aclass="referer"target="_blank">@dcx013:最后解决了吗???myeclipse不好用吗?我用的也是myeclipse啊,看来要换了。。。回复<aclass='referer'target='_blank'>@dcx013:重新下载jfinal的jar包,在myecipse下应该也不会有问题,对不同环境做了防御性编码我用的myeclipse出现这个错误,但换了Eclipse没有这个错误了我也遇到了这个问题经重新下载替换后问题解决我看了一下文件的hashcode也不一致不知道什么时候修改了用1.9demo里面的jar包没有问题。用all里面的jar包有问题解决了:
有一些demo是直接用:
C3p0Pluginc3p0Plugin=newC3p0Plugin(getProperty("jdbcUrl"),getProperty("user"),getProperty("password"));
getProperty和PropKit的问题。如果是getproperty需要配置另一个property文件,完整的解决办法是:
Propp=PropKit.use("a_little_config.txt");
C3p0Pluginc3p0Plugin=newC3p0Plugin(p.get("jdbcUrl"),p.get("user"),p.get("password"));
a_little_config.txt
===================
jdbcUrl=jdbc:mysql://127.0.0.1/taobao?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
user=root
password=123123
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。