Oracle driver memory leak - Tomcat

前端 未结 2 841
时光说笑
时光说笑 2021-01-05 12:12

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

2条回答
  •  轮回少年
    2021-01-05 12:40

    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.

提交回复
热议问题