idea 调试报错 Illegal access: this web application instance has been stopped already

文章描述了一个在执行代码时遇到的错误,具体是由于尝试访问已停止的Web应用程序实例而引发的IllegalAccess异常。错误出现在尝试加载XMLParserConfiguration服务时。作者认为问题可能源于Tomcat的重复启动,即旧的Tomcat线程未完全关闭就启动了新的实例。解决方案是彻底关闭所有Tomcat进程,然后重新开始调试。
摘要由CSDN通过智能技术生成

1、报错信息

执行到当前代码 Map<String, Object> map = parseMapOneRegion(page, ruleRegion);

不进入该代码,则直接下一步,会报错!

2023-02-22 21:03:31.082 [INFO ] [autocrawler-worker  ] [pool-4-thread-1] [autocrawler worker 105346] [org.apache.catalina.loader.WebappClassLoaderBase] - Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration]. 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 [META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration]. 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.getResourceAsStream(WebappClassLoaderBase.java:1115)
	at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
	at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
	at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
	at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)

2、原因分析:调试的时候,可能是tomcat 进程重复开了,在 tomcat 重启的时候,因为之前的 tomcat 中的线程还没有完全关闭,新启动 tomcat 就会报这个异常。


3、解决:全部关闭,重新进行调试即可

评论 22
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

伟庭大师兄

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值