您的位置:首页 > 移动开发

this web application instance has been stopped already

2012-09-13 11:41 417 查看
tomcat 关闭时报异常:

Feb 23, 2012 8:06:54 PM org.apache.catalina.loader.WebappClassLoader loadClass

INFO: Illegal access: this web application instance has been stopped already. Could not load org.hsqldb.lib.LongKeyHashMap$Values. 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.

原因:内存库没有关闭。

方法:在监听里contextDestroyed()方法里写

 Connection conn = null;

        try {

            Class.forName("org.hsqldb.jdbcDriver");

            conn = DriverManager.getConnection("jdbc:hsqldb:mem:db", "sa", "");

            Statement stmt = conn.createStatement();

            stmt.execute("SHUTDOWN;");

            conn.close();

        } catch (Exception e) {

           // do nothing

        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐