I'm seeing the following error during Tomcat shutdown:
Jan 04, 2015 4:14:31 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
I understand Tomcat forcibly unregistered the driver to prevent a memory leak.
However, how to fix and who is responsible for fixing this issue -- me, Tomcat DBCP, or Derby?
I'm using Tomcat 7.0.47 and Derby 10.11.1.1
context.xml for Tomcat:
<Context>
<Resource name="jdbc/db" auth="Container" type="javax.sql.DataSource"
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="100"
minIdle="2"
maxIdle="30"
maxWait="10000"
validationQuery="VALUES 1"
testOnBorrow="true"
removeAbandoned="true"
url="jdbc:derby:dev;create=true"
username="root"
password="root"
/>
</Context>
Similar questions I found on Google referenced DERBY-4895, but that issue has been fixed a while ago.