首页  >  问答  >  正文

java - ssh整合问题,,tomcat6,运行时一开始没错,过一段时间就会报下面这个错,但是还是能运行?

Illegal access: this web application instance has been stopped already. Could not load com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask. 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.WebappClassLoader.loadClass(WebappClassLoader.java:1566)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:980)
at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1406)
at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1378)
at com.mchange.v2.resourcepool.BasicResourcePool.cullExpired(BasicResourcePool.java:1462)
at com.mchange.v2.resourcepool.BasicResourcePool.access$1900(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1937)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

怪我咯怪我咯2743 天前435

全部回复(2)我来回复

  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:54:12

    如果觉得代码没有问题,你可以试着换一个版本的tomcat,比如8.0,或者8.5.

    tomcat9好像目前有点问题,我前两个星期试了一下跑不起来

    回复
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:54:12

    tomcat 报异常Illegal access: this web application instance has been stopped already .Could not load异常信息不能反映系统启动失败的根本原因。遇到这类异常,很多开发人员可能会有些不知所措,因为不知道问题发生在哪里。这里教大家一个窍门,帮助大家准确定位tomcat系统启动失败的原因。

    1.准备一个配置文件,名称必须是:logging.properties。
    文件内容如下:

    handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler      
    
    org.apache.juli.FileHandler.level = FINE    
    org.apache.juli.FileHandler.directory = ${catalina.home}/logs/tomcat.log  
    org.apache.juli.FileHandler.prefix = error-debug.    
         
    java.util.logging.ConsoleHandler.level = FINE    
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    1. 将这个文件logging.properties放置在java web工程的web-inf/classes下面

    2. 重启Tomcat
      这时,你就会发现tomcat自动打印出了更多有作用的异常信息。分析下这些新打印出来的异常信息,就能立马定位问题了。

    回复
    0
  • 取消回复