Hi!
Ich habe seit kurzem einen Tomcat 8.0.20 im Einsatz und ein paar Probleme mit der MemoryLeakDetection.
In meiner App habe ich einen Scheduler. Es ist ein TimerTask welcher in der initMethode eines Servlets einmalig gestartet wird. Dieser holt sich eine DbConnection aus einem Pool. Liest ein paar kleine Daten und schießt die Connection im FinallyBlock. Das untenstehende ist wohl nur eine Warnung, ohne dass sonst etwas passiert?
16-Mar-2015 17:48:42.328 WARNING [http-apr-8080-exec-8] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [webapp] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
Bedeutet das untenstehende, das mir Tomcat den Scheduler, also nur den TimeThread, selbsttägig gekillt hat?
16-Mar-2015 17:49:22.983 INFO [Timer-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.apache.log4j.spi.LocationInfo]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.log4j.spi.LocationInfo]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
Bedeutet das hier, dass der Scheduler nicht mehr existiert?
Exception in thread "Timer-0" java.lang.IllegalStateException: Can't overwrite cause with java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.log4j.spi.LocationInfo]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
Der Scheduler läuft trotzdem irgendwie weiter, heißt immer Timer-0 und kommt es öfter vor, dass sich der Scheduler keine Connection erhält und die untenstehende Log kommt. Interessant ist, dass der Scheduler, während des Betriebs, mal eine Connection bekommt und dann mal wieder nicht.
2015-03-16 18:01:41 /webapp ERROR Scheduler:113 - Name [comp/env/jdbc/myDS] is not bound in this Context. Unable to find [comp].
Wo könnte das Problem liegen?
Wo soll ich genauer hinsehen?
Danke!