jfinal 2.0 启动报错,很早之前的项目 我刚维护

Starting JFinal 2.0

log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Starting scanner at interval of 5 seconds.

Starting web server on port: 8080

log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

java.lang.RuntimeException: Can not create instance of class: com.ksource.jfinal.MyJFinalConfig. 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.ksource.jfinal.MyJFinalConfig.main(MyJFinalConfig.java:130)



web.xml 路径我觉得没问题

image.png


image.png

评论区

kongss

2019-09-30 13:07

杜福忠

2019-09-30 13:42

@kongss 波总今天大喜,估计是没时间上网了2333
重新Project》》clean...手动清理编译一下看下classess里面文件是否都生成好了

kongss

2019-09-30 13:56

@杜福忠 都生成了

杜福忠

2019-09-30 14:02

@kongss 检查项目的根目录是 WebRoot还是 WebCountent 实在找不到问题的话,建议大兄弟直接新建一个web项目然后把 src 和 根目录 页面等文件拷贝到新项目里面去,再跑跑试试

kongss

2019-09-30 14:09

@杜福忠 东西太老了,弄过去一堆错误

杜福忠

2019-09-30 14:13

@kongss 老项目没事,说明之前是正常运行的嘛。 所以排除项目代码的问题,就是项目配置的问题,多配置几次弄熟练了就好了,找找eclipse web 项目的配置资料看看

jfinal_wj

2019-10-08 17:00

tomcat里面也请了,项目clean一下就好,今天4.5也报这个错了

热门反馈

扫码入社