开发者社区> 问答> 正文

Exception starting filter jfinal;Can not?报错

@JFinal 你好,想跟你请教个问题:今天启动Tomcat报错(昨天没问题,代码未修改)

严重: Exception starting filter jfinal
java.lang.RuntimeException: Can not create instance of class: com.clschina.csgl.config.CsglConfig
at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:98)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4573)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5188)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.clschina.csgl.config.CsglConfig
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:96)
... 13 more


展开
收起
爱吃鱼的程序员 2020-06-12 14:50:39 637 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

      是否在web.xml中配置了:<configClass><spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">com.clschina.csgl.config.CsglConfig</configClass>,另外检查一下CsglConfig是否继承了JFinalConfig类,最后,检查一下Defaultoutputdirectory是否填写的:项目名称/WebRoot/WEB-INF/classes以上三项均没有问题。后来把原Tomcat删除掉,重新配置新的就没有以上问题了。

    停掉Tomcat,clean一下项目再重启

    2020-06-12 14:50:56
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Data-Driven Water Security with Bluemix Apache Spark Service 立即下载
Apache Wicket User Guide - Ref 立即下载
In-Flux Limiting for a Multi-Tenant Logging Service 立即下载