JFinal框架学习debug

最近在学习jfinal这个框架,就目前而言确实比较轻量级。

下面这是我在部署的时候出现的一个问题,怎么解决的呢?

1.应该是一个default output folder问题,项目的java build path面板, 然后找到default output folder, 把这里的输出改为your_project/WebRoot/WEB-INF/classes#2.因为使用的是properties文件所以应该调用loadPropertyFile("config.properties");方法,而不是PropKit.use(“config.properties”);

Starting JFinal 2.0
Starting scanner at interval of 5 seconds.
Starting web server on port: 80
2015-08-13 13:28:14.822:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
	at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:104)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
	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:121)
	at com.jfinal.server.JettyServer.start(JettyServer.java:64)
	at com.jfinal.core.JFinal.start(JFinal.java:137)
	at com.dcx.common.CommonConfig.main(CommonConfig.java:64)
2015-08-13 13:28:14.822:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/H:/J2EE_eclipse/jfinal01/WebRoot/}
java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
	at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:104)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
	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:121)
	at com.jfinal.server.JettyServer.start(JettyServer.java:64)
	at com.jfinal.core.JFinal.start(JFinal.java:137)
	at com.dcx.common.CommonConfig.main(CommonConfig.java:64)
2015-08-13 13:28:14.823:WARN:oejuc.AbstractLifeCycle:FAILED o.e.j.w.WebAppContext{/,file:/H:/J2EE_eclipse/jfinal01/WebRoot/}: java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
	at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:104)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
	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:121)
	at com.jfinal.server.JettyServer.start(JettyServer.java:64)
	at com.jfinal.core.JFinal.start(JFinal.java:137)
	at com.dcx.common.CommonConfig.main(CommonConfig.java:64)
2015-08-13 13:28:14.823:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@6df97b55: java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
	at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:104)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
	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:121)
	at com.jfinal.server.JettyServer.start(JettyServer.java:64)
	at com.jfinal.core.JFinal.start(JFinal.java:137)
	at com.dcx.common.CommonConfig.main(CommonConfig.java:64)
java.lang.RuntimeException: Can not create instance of class: com.dcx.common.CommonConfig. Please check the config in web.xml
	at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:104)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
	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:121)
	at com.jfinal.server.JettyServer.start(JettyServer.java:64)
	at com.jfinal.core.JFinal.start(JFinal.java:137)
	at com.dcx.common.CommonConfig.main(CommonConfig.java:64)


你可能感兴趣的:(jFinal)