Closed ejouvin closed 6 years ago
Hi @ejouvin , yes, this log is expected. The cleanest way to avoid this issue would be to use a datasource managed directly by tomcat, but I don't think it's worth the effort.
If you are interested in providing a pull request, the solution would be to support a JNDI datasource.
The code to change would be inside the class io.lavagna.config.DataSourceConfig
Hye.
Yes for sure If I have time I will try. I first started to try to setup my environment, but unfortunatly I did not have more time.
I log this just for reminder and if I have an idea I will try to push. But I think datasource is not a good idea, too complex for installation. Many other applications just need to deploy the webapp. Need to find how they do (DAO abstraction, but is it possible in the current code ?)
I will let you know for sure
I’m closing this issue because it has been inactive for too long, please reopen it if you still encounter this issue.
Since the last fix for the Driver registration in Tomcat when I try to shutdown Tomcat, an error is thrown and display in Tomcat log.
20-Dec-2016 00:00:30.436 AVERTISSEMENT [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [lavagna] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 20-Dec-2016 00:00:30.437 AVERTISSEMENT [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [lavagna] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 20-Dec-2016 00:00:30.440 AVERTISSEMENT [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [lavagna] appears to have started a thread named [Abandoned connection cleanup thread] 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.ref.ReferenceQueue.remove(ReferenceQueue.java:143) com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43) 20-Dec-2016 00:00:30.441 AVERTISSEMENT [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [lavagna] appears to have started a thread named [ThreadPoolTaskScheduler-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745)