天天看點

啟動SSH架構項目 Tomcat報錯

版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。 https://blog.csdn.net/bitree1/article/details/50184055

org.apache.catalina.core.StandardContext listenerStart
嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/applicationContext.xml]; nested exception is java.lang.OutOfMemoryError: PermGen space
Caused by: java.lang.OutOfMemoryError: PermGen space
org.apache.catalina.core.StandardContext start
嚴重: Error listenerStart
 org.apache.catalina.core.StandardContext start
嚴重: Context [/testAjax] startup failed due to previous errors
 org.apache.catalina.core.ApplicationContext log
資訊: Closing Spring root WebApplicationContext
org.apache.catalina.core.StandardContext listenerStop
嚴重: Exception sending context destroyed event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.OutOfMemoryError: PermGen space
org.apache.catalina.core.StandardContext listenerStop
嚴重: Exception sending context destroyed event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.OutOfMemoryError: PermGen space
      
嚴重: Error deploying web application directory YanZhengMa
java.lang.OutOfMemoryError: PermGen space
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      

Caused by: java.lang.OutOfMemoryError: PermGen space

實是記憶體溢出.出現這個問題可能有好幾個原因:

1.你tomcat部署的項目太多了,建議清空tomcat/work下的檔案夾,重新部署需要的那個項目.

2.你可能用apache+tomcat進行整合了,但是沒配置好,導緻使用者請求頁面的是和産生了轉發死循環,導緻記憶體溢出.解決辦法是重新配置你的伺服器.因為這個問題比較麻煩,你可以先把項目放到一個新的tomcat下試試能不能啟動

.3.還有一種情況就是你程式寫的有問題了,出現的原因應該是你的類加載器一直加載類檔案,導緻預設的記憶體空間不夠用了.是不是工廠方法沒有用.