整合SSH框架出现WebappClassLoaderBase.java:1385错误

整合SSH框架时出现的问题

学习Hibernate、Struts、Spring时,在学完Hibernate和Struts后测试没有出现问题,在原来基础上修改一些Spring的内容,启动tomcat时出现了下面问题。

17-May-2020 18:37:33.253 信息 [mysql-cj-abandoned-connection-cleanup] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
        java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
                at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1385)
                at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1038)
                at com.mysql.jdbc.AbandonedConnectionCleanupThread.checkThreadContextClassLoader(AbandonedConnectionCleanupThread.java:112)
                at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:79)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                at java.lang.Thread.run(Unknown Source)

花了很久查找资料,没有找到解决方案或与该bug相关内容,故将这个问题挂起。

查找tomcat localhost日志后 发现是配置应用程序监听器[org.springframework.web.context.ContextLoaderListener]错误

修改lib文件夹后

异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener]

最终debug结果<

缺少common-logging的jar包,该jar包与log4j配合使用

你可能感兴趣的:(自学)