java异常Illegal access: this web application instance has been stopped already. Could not load net.sf
在重启tomcat的时候出现此异常,但是不影响正常功能。异常代码:信息: Illegal access: this web application instance has been stopped already.Could not load net.sf.ehcache.store.disk.DiskStore$KeySet.The eventual following stack trace
·
在重启tomcat的时候出现此异常,但是不影响正常功能。
异常代码:
信息: Illegal access: this web application instance has been stopped already. Could not load net.sf.ehcache.store.disk.DiskStore$KeySet. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1776)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1734)
at net.sf.ehcache.store.disk.DiskStore.keySet(DiskStore.java:521)
at net.sf.ehcache.store.disk.DiskStorageFactory$DiskExpiryTask.run(DiskStorageFactory.java:828)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
异常分析:反复频繁的重启tomcat导致上一个tomat中的线程没有正常关闭。
解决办法:
将tomcat中的server.xml中的reloadable由原来的true改为false。
设置reloadable="true"后,tomcat会实时的监控项目的源码,一旦出现改动会自己重启tomcat服务器。在调试程序的时候一般都不会设置relaodable=“true”,频繁的重启tomcat是不合理的。如果你设置了reloadable=“false”,或者没有设置这个属性,只有当你在添加,删除,重命名方法或实例字段的时候才要求服务重启,适合你调试程序。
文件设置:server.xml > reloadable=“false”。
更多推荐
已为社区贡献8条内容
所有评论(0)