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

本文详细记录了在整合SSH框架(Struts+Spring+Hibernate)过程中遇到的异常问题,包括在Tomcat启动时出现的非法访问错误,以及配置应用程序监听器的错误。通过debug和日志检查,最终定位问题为缺少common-logging的jar包,该问题解决过程对于初学者具有一定的参考价值。

整合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配合使用

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值