Hi,

I am using Tomcat 7.0.25 in a Linux machine

I am using Tomcat's connection pool 
(org.apache.tomcat.dbcp.dbcp.BasicDataSource). As database I am using H2 as a 
file database.
All is ok, but I have the following problem.
On shutdown of Tomcat I see in catalina.out: 


SEVERE: The web application [/GeneralApplication] appears to have started a 
thread named [H2 Log Writer GENERICAPPLICATION] but has failed to stop it. This 
is very likely to create a memory leak.
Apr 4, 2012 2:32:54 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/GeneralApplication] appears to have started a 
thread named [H2 File Lock Watchdog 
/opt/en/repos/tomcat/webapps/GeneralApplication/db/internaldatabase.lock.db] 
but has failed to stop it. This is very likely to create a memory leak.

Why do I get these messages?
As I understand these messages, H2 is still running on shutdown and the 
documentation they have says that the database will shutdown once the last 
connection is closed (and the connections are handled by the pool i.e. Tomcat)

Additionally the input from H2 dev is that these messages are a Tomcat problem. 
Tomcat should have first disposed of the connection pool and then log the 
running threads.Their explanation seem correct to me.

Is this a known issue? Why do I see these errors in catalina? Should I somehow 
dispose off the connection pool myself?

Thank you for your time
Best Regards,
FH

Reply via email to