">

一、问题描述

Apr 20, 2017 8:49:24 AM org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load oracle/sql/converter_xcharset/lx20354.glb. 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.

Apr 20, 2017 8:49:31 AM org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load oracle/sql/converter_xcharset/lx20354.glb. 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.

Apr 20, 2017 8:49:34 AM org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
INFO: Illegal access: this web application instance has been stopped already. Could not load oracle/sql/converter_xcharset/lx20354.glb. 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.




这个问题只是在日志文件中出现,但并不影响tomcat的访问,一样是可以用的。只是这个问题不断的在日志中打印,看着不爽或者也会导致其它未知的问题。



二、解决方案



方法一:



原因是因为在tomcat重启的时候,之前的tomcat的线程还没有完全关闭,最新启动tomcat就会报这个异常。

针对这种情况,在网上找了些原因

Java代码 收藏代码
运行tomcat/bin/shutdown.sh,tomcat停止,但它的java进程还在,事不过状态为S(sleep),不是运行时的R(Runnable),如果不kill的话,这种进程越来越多
不过暂时未验证。



解决方法是重启Tomcat和Apache服务器,我把整个Linux服务器重启后就可以了正常使用,现做个记录,后面验证。同时也可以清除tomcat的临时目录(如:D:\tomcat-7.0.63\work\Catalina),避免文件冲突问题。



方法二:



避免这种错误另一种做法,就是修改tomcat下conf/server.xml文件,把host节点中context中的reloadable修改为false,如:


<Context path="" docBase="/home/java/tomcat7/webapps/finance" debug="0" reloadable="true"/>
改成
<Context path="" docBase="/home/java/tomcat7/webapps/finance" debug="0" reloadable="false"/>


但是这样做会失去热部署的优势,而且对于开发也不是很方便,建议不要用这种方式。