017-11-28 14:09:20.084:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.RuntimeException: Can not create instance of class: demo.DemoConfig. Please check the config in web.xml java.lang.RuntimeException: Can not create instance of class: demo.DemoConfig. Please check the config in web.xml at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:109) 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 com.jfinal.server.JettyServer$1.onChange(JettyServer.java:119) at com.jfinal.server.Scanner.compare(Scanner.java:88) at com.jfinal.server.Scanner.working(Scanner.java:57) at com.jfinal.server.Scanner.access$000(Scanner.java:31) at com.jfinal.server.Scanner$1.run(Scanner.java:94) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source)
用的jar包是3.3的,在github上下载的,但是web.xml放在/jfinal_demo/WebRoot/WEB-INF/web.xml这个路径下面的时候就会报这个错误,如果把web.xml放在/jfinal_demo/WebRoot/web.xml这个路径下面的话就没有这个错误,难道是路径错了吗?
2、浏览器端http://localhost/hello报错404,第一次接触,有点方,请指导
项目:JFinal
Can not create instance of class: demo.DemoConfig. Please check the config in web.xml
一是 demo.DemoConfig.java 这个文件可能不存在,注意看路径与文件名都要对,二是 DemoConfig 可能没有继承 JFinalConfig,三是 eclipse 的 Default Output Folder 没有配置正确