I'm setting up a web app on Tomcat. Using H2 seems to work great, except for a warning that keeps popping up in the Tomcat logs:
SEVERE: The web application [/TestApp] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
At first I had more similar warnings about H2 memory leaks, but they went away when I registered the DbStarter listener in my web.xml:
...
<context-param>
<param-name>db.url</param-name>
<param-value>jdbc:h2:~/test</param-value>
</context-param>
<context-param>
<param-name>db.user</param-name>
<param-value>test</param-value>
</context-param>
<context-param>
<param-name>db.password</param-name>
<param-value>test</param-value>
</context-param>
<listener>
<listener-class>org.h2.server.web.DbStarter</listener-class>
</listener>
...
But the warning I mentioned above remains. Is this normal, or am I forgetting something?