We are migrating from Java 8 to Java 11, while starting the tomcat server-9 getting below exception for few application only.
Using Eclipse and com.ibm.db2.jcc.DB2Driver to connect to database.
WARNING: The web application [Sample] appears to have started a thread named[POJO.data] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
Steps tried given in The web application appears to have started a thread named [Timer-0] but has failed to stop it
- Not using any java.util.Timer in our application.
- Rmoved Oracle jar file from lib.
- Tried adding -Xms128m -Xmx1024m configuration of tomcat
- AbandonedConnectionCleanupThread.shutdown() - not using mysql to do any coding for this.
- Exception stacktrace shows thread named [POJO.data] - here POJO is simple java class with getter and setter method not sure why its picking pojo classes.