当我尝试重新部署我的项目时,有时它会耗尽内存并抛出 perGemSpace 错误(只需重新部署 2-3 次) 我知道我的项目有一些内存泄漏问题,但无法弄清楚,请有人向我解释。 :-?
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/qlbc-portlet] registered the JDBC driver [net.sf.log4jdbc.DriverSpy] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/qlbc-portlet] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/qlbc-portlet] appears to have started a thread named [Thread-43] but has failed to stop it. This is very likely to create a memory leak.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/qlbc-portlet] appears to have started a thread named [Timer-4] but has failed to stop it. This is very likely to create a memory leak.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/qlbc-portlet] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/qlbc-portlet] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
Jan 14, 2013 1:12:21 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/qlbc-portlet] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
最佳答案
看起来您没有取消注册您的驱动程序或停止您的线程。
如果你不能很好地管理这些项目,你很可能会出现内存泄漏,比如这样的情况。
关于java - java liferay项目中的内存泄漏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14310227/