I get the following exception in Tomcat shutdown :
thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.util.TimerThread.mainLoop(Timer.java:526)
java.util.TimerThread.run(Timer.java:505)
I am using embedded Derby in my server which uses
org.apache.derby.iapi.services.timer.TimerFactory
which constructs a TimerThread
in
java.util.Timer
which causes the issue (Stop scheduled timer when shutdown tomcat) .
How can I solve it ?