We\'re using tomcat-7.0.33. Spring 3.0.1 and JPA using a tomcat JNDI datasource. Oracle 10g on the backend using ojdbc6.jar (latest).
When we try to undeploy the a
In the listener you have also to de-register the JDBC driver (i.e. ojdbc5.jar or what you are using).
See this SO question for the code snippet.
Figured out the issue... Toni had a good suggestion (but de-registering the driver meant that when the app reloaded the driver was no longer available!).
In our case we were accidentally including ojdbc6.jar with our web app AND in the Tomcat/lib directory. This pressumably caused Tomcat to use our classloader to create objects. Thus when our application was being unloaded Tomcat's DBCP pool still had open handles to classes in our application.
Removing ojdbc6.jar from our WEB-INF/lib solved the problem.