@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
是否在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一下项目再重启
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。