先前运行的tomcat类仍然存在 [英] tomcat classes from previous run remains
问题描述
我正在运行一个使用spring,hibernate,jsf等的应用程序.该应用程序还使用ha-jdbc使数据库高度可用.第一次部署该应用程序时,该应用程序运行平稳,但是当取消部署并重新部署该应用程序时,tomcat会出现以下错误:
以下Web应用程序已停止(重新加载,取消部署),但是它们 先前运行的类仍会加载到内存中,从而导致内存不足 泄漏(使用探查器进行确认):
我想知道如何摆脱这个问题.有天才吗?
提前谢谢.
使用探查器(visualvm会这样做),创建堆快照,查找遗留的对象,查找引用链,并思考为什么仍要引用它们. /p>
,或者只需为每个部署重新启动tomcat.
i am running an application which uses spring, hibernate, jsf, etc. the application also uses ha-jdbc to make the databases highly available. when the application is deployed for the first time, the app runs smoothly, but when it is un-deployed and deployed back, tomcat gives the following error:
The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still loaded in memory, thus causing a memory leak (use a profiler to confirm):
i am wondering how to get rid of this problem. any genius?
thanks in advance.
use a profiler (visualvm would do), do a heap snapshot, find the lingering objects, find the reference chain, and ponder why they are still referenced.
or, just restart tomcat for each deployment.
这篇关于先前运行的tomcat类仍然存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!