Tomcat 启动成功后报 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access:

Tomcat 启动成功后报 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access:

1、某天页面忽然访问错误,查看日志发现没什么问题,使用万能的重启大法,重启后 tomcat 报错:

图片版

文字版

27-Dec-2017 17:53:15.073 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-19994"]
27-Dec-2017 17:53:15.077 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 10930 ms

27-Dec-2017 17:53:15.847 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.net.InetAddress]. 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 [java.net.InetAddress]. 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:1325)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1178)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
at org.quartz.utils.UpdateChecker.getClientId(UpdateChecker.java:149)
at org.quartz.utils.UpdateChecker.buildParamsString(UpdateChecker.java:120)
at org.quartz.utils.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:114)
at org.quartz.utils.UpdateChecker.doCheck(UpdateChecker.java:55)
at org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:47)
at org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

27-Dec-2017 17:53:15.850 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.net.URLEncoder]. 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 [java.net.URLEncoder]. 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:1325)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1178)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
at org.quartz.utils.UpdateChecker.urlEncode(UpdateChecker.java:156)
at org.quartz.utils.UpdateChecker.buildParamsString(UpdateChecker.java:122)
at org.quartz.utils.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:114)
at org.quartz.utils.UpdateChecker.doCheck(UpdateChecker.java:55)
at org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:47)
at org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

2、各种谷歌、度娘,未果,认真读报错,发现应该是代码中的定时问题:

屏蔽后无报错,报错原因是添加了(年份)字段,定时日期变成过期,无法启动~~
PS1:测试过去掉年份和将年份改为2020,均无错误
PS2:没有找到官方文档佐证~~

原文地址:https://www.cnblogs.com/anzerong2012/p/8134167.html