Hi Dan, The following entry is in server.xml
<Resource name="jdbc_GENERIS_RS" auth="Container" type="javax.sql.DataSource" driverClassName="org.h2.Driver" url="jdbc:h2:file:/opt/en/repos/tomcat/webapps/GeneralApplication/db/internaldatabase;SCHEMA=genericschema" username="root" password="sa" maxActive="20" maxIdle="10" maxWait="-1" /> And the following entry is under $TOMCAT_HOME/conf/context.xml <ResourceLink name="jdbc/GenericDataSource" global="jdbc_GENERIS_RS" type="javax.sql.DataSource"/> Do you need more details than these? ________________________________ From: Daniel Mikusa <dmik...@vmware.com> To: Tomcat Users List <users@tomcat.apache.org> Sent: Wednesday, April 4, 2012 3:35 PM Subject: Re: Discrepancy between Tomcat's connection pool and tomcat's report on memory leaks ----- Original Message ----- > 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. Where are you defining the connection pool? Can you include your configuration? Dan > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org