0

i am getting these warning ni the console whennever i start my webapp.

août 21, 2013 1:23:12 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: 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:1600)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:1040)
    at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1507)
    at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:1477)
    at com.mchange.v2.resourcepool.BasicResourcePool.cullExpired(BasicResourcePool.java:1565)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$1900(BasicResourcePool.java:44)
    at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:2089)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

what can be the cause?

mising jar? which jar?

thanks in advance,

user2627156
  • 151
  • 1
  • 3
  • 11
  • I'm guessing that you are redeploying your webapp to Tomcat and not starting it for the first time, is this true? Do you get these errors when you start for the first time? This kind of error is typically received when Tomcat is stopping an existing web application and that application does not shutdown all of its threads (e.g. your timer thread) first. – Pace Aug 21 '13 at 13:12
  • that's true, it is displayed when i restart my webapp – user2627156 Aug 22 '13 at 12:21
  • 2
    That error means you are not shutting down all your threads when the contextDestroyed() event arrives. A clean application is supposed to catch that event, shut down all its threads, and clean up all its static state. Tomcat will then unload the classes. Since your old thread (looks like a database connection pool thread) is still around it tries to access classes that don't exist anymore (because Tomcat unloaded them) and Tomcat refuses to load them again which is the error you're getting. – Pace Aug 22 '13 at 15:45
  • and how to deal with this warning? – user2627156 Aug 24 '13 at 17:36
  • Shut down all threads when you receive a contextDestroyed() event. Take a look at the accepted answer [here](http://stackoverflow.com/questions/9173132/stop-scheduled-timer-when-shutdown-tomcat) for an example. – Pace Aug 25 '13 at 03:24

0 Answers0