I've googled and search stackoverflow, a lot but can't find the answer for this.
I have a Maven, Spring MVC Web app, connecting to a MySQL database.
The problem is that every time I redeploy (stop, undeploy then deploy) my war file I get the following exceptions in the log file:
SEVERE: The web application [/XYZ-0.0.0] 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.
SEVERE: The web application [/XYZ-0.0.0] 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.
After +-5 redeploys I get java.lang.OutOfMemoryError: PermGen space
error and have to restart Tomcat - sometimes I have to reboot my machine.
I've looked at: To prevent a memory leak, the JDBC Driver has been forcibly unregistered and tried option 3 (Not sure how or what to move to Tomcat's /lib
directory, i.e., do I 'move' spring-jdbc or mysql-connector-java?)
I've implemented a connection pool in an attempt to fix the problem, but it didn't help.
I use Netbeans but I've installed the 'windows version' of Tomcat 7, i.e., the one without the catalina.bat file and thus I can't get the profiler up and running. (I would like to not re-install Tomcat...)
Please help - How do I find and fix the memory leak?