0

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

  1. Not using any java.util.Timer in our application.
  2. Rmoved Oracle jar file from lib.
  3. Tried adding -Xms128m -Xmx1024m configuration of tomcat
  4. AbandonedConnectionCleanupThread.shutdown() - not using mysql to do any coding for this.
  5. 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.
Mahajan
  • 11
  • 4
  • 1.Link didn't help, removed Oracle jar file from lib. 2.Tried adding -Xms128m -Xmx1024m configuration of tomcat. Not added any code to resolve as same code works fine in Java 8. Other projects works fine with Java 11 so such error. It has to error out for all project but that's not case. Its happening only for specific application only. – Mahajan Apr 14 '23 at 06:09

0 Answers0