搜尋

首頁  >  問答  >  主體

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)

怪我咯怪我咯2803 天前467

全部回覆(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
  • 取消回覆