java.util.TimerThread.run(Unknown Source)
一月 05, 2018 3:19:51 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
一月 05, 2018 3:19:51 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
一月 05, 2018 3:19:51 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 7559 ms
一月 05, 2018 3:19:51 下午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading
信息: Illegal access: this web application instance has been stopped already. Could not load [net.sf.ehcache.util.ProductInfo]. 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 [net.sf.ehcache.util.ProductInfo]. 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:1311)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1299)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at net.sf.ehcache.util.UpdateChecker.buildParamsString(UpdateChecker.java:125)
at net.sf.ehcache.util.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:121)
at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:69)
at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:60)
at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:51)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
将tomcat的server.xml中的Context的reloadable设成false。
比如:<Context path="/expert" docBase="expert" debug="0" reloadable="false">
解决办法也容易,只要把tomcat的server.xml 中的reloadable="true" 改成false就行了,不过这样做就失去了热部署的优势了,对于开发不是很方便,干脆还是不改吧。这种错误不用理会.
报错原理:
原因是因为在tomcat重启的时候,因为之前的tomcat中的线程还没有完全关闭,新启动tomcat就会报这个异常,不过这个不影响正常使用,只是跳个异常挺烦人的。使用过hibernate, spring或其他大型组件,当一个WEB应用系统中有很多类时,如果开启了Tomcat的reloadable=true,那么每当相关文件改变时, Tomcat会停止web app并释放内存,然后重新加载web app.这实在是个浩大的工程。所以我们总是在想如果能有只重载某几个类的功能,将极大的满足了我们的调试。
当response.sendRedirect("xxxx"); 时,而客户端关闭了浏览器,就会出这种错.
并非程序错误.