Tomcat内存溢出,异常信息如下:

十一月 26, 2017 1:52:26 下午 org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor run
严重: Unexpected death of background thread ContainerBackgroundProcessor[StandardEngine[Catalina]]
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.reflect.Proxy.newInstance(Proxy.java:764)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755)
at sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:300)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:290)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:117)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.reflect.Method.declaredAnnotations(Method.java:714)
at java.lang.reflect.Method.getAnnotation(Method.java:700)
at org.springframework.core.annotation.AnnotationUtils.getAnnotation(AnnotationUtils.java:68)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiredAnnotation(AutowiredAnnotationBeanPostProcessor.java:376)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:347)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:318)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:379)
at com.opensymphony.xwork2.spring.SpringObjectFactory.autoWireBean(SpringObjectFactory.java:203)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:183)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:154)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:192)
at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:70)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1101)
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395) at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.reflect.Proxy.newInstance(Proxy.java:764)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755)
at sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:300) at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:290)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:117)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.reflect.Method.declaredAnnotations(Method.java:714)
at java.lang.reflect.Method.getAnnotation(Method.java:700)
at org.springframework.core.annotation.AnnotationUtils.getAnnotation(AnnotationUtils.java:68)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiredAnnotation(AutowiredAnnotationBeanPostProcessor.java:376) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:347)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:318)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:379)
at com.opensymphony.xwork2.spring.SpringObjectFactory.autoWireBean(SpringObjectFactory.java:203)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:183)
at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:154)
at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151) at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:192)
at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:70)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1101)
Exception in thread "default-workqueue-4" java.lang.OutOfMemoryError: PermGen space
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:235)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:432)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584) at org.apache.cxf.ws.addressing.VersionTransformer$Names200408.getJAXBContext(VersionTransformer.java:540)
at org.apache.cxf.ws.addressing.VersionTransformer.getExposedJAXBContext(VersionTransformer.java:481)
at org.apache.cxf.ws.addressing.soap.MAPCodec.unmarshalMAPs(MAPCodec.java:489)
at org.apache.cxf.ws.addressing.soap.MAPCodec.decode(MAPCodec.java:675)
at org.apache.cxf.ws.addressing.soap.MAPCodec.mediate(MAPCodec.java:172)
at org.apache.cxf.ws.addressing.soap.MAPCodec.handleMessage(MAPCodec.java:121)
at org.apache.cxf.ws.addressing.soap.MAPCodec.handleMessage(MAPCodec.java:78)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.udp.UDPDestination$MCastListener$2.run(UDPDestination.java:106)
at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:745)

解决方案:

  利用Notepad++打开该bat脚本文件:D:\MyDev\Tomcat\apache-tomcat-7.0.68\bin\catalina.bat

  在该行:[echo Using CATALINA_BASE:   "%CATALINA_BASE%"]上一行添加一下内容:

REM 解决java.lang.OutOfMemoryError: PermGen space
REM JAVA_OPTS="-server -XX:PermSize=64M -XX:MaxPermSize=128m" REM 解决java.lang.OutOfMemoryError: Java heap space
REM JAVA_OPTS="-server -Xms256M -Xmx512M -XX:MaxNewSize=512m -Djava.awt.headless=true" set JAVA_OPTS="%JAVA_OPTS% -server -XX:PermSize=64M -XX:MaxPermSize=128m -Xms256M -Xmx512M -XX:MaxNewSize=512m -Djava.awt.headless=true"

  如截图所示(可点击图片并右键,于新标签页中打开查看):

MyEclipse中项目运行时发生了Tomcat报错:[java.lang.OutOfMemoryError: PermGen space]的更多相关文章

  1. Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法

    有的项目引用了太多的jar包,或者反射生成了太多的类,异或有太多的常量池,就有可能会报java.lang.OutOfMemoryError: PermGen space的错误, 我们知道可以通过jvm ...

  2. tomcat启动报错java.lang.OutOfMemoryError:PermGen space解决办法

    tomcat启动错误提示: 严重: Error waiting for multi-thread deployment of WAR files to completejava.util.concur ...

  3. Tomcat内存溢出(java.lang.OutOfMemoryError: PermGen space)

    Tomcat启动时报如下错误:     java.lang.OutOfMemoryError: PermGen space 解决办法:     配置相关内存大小.其中按照启动tomcat的不同方式,分 ...

  4. Tomcat内存溢出(java.lang.OutOfMemoryError: PermGen space)的解决办法

    Tomcat启动时报如下错误: java.lang.OutOfMemoryError: PermGen space 解决办法: 配置相关内存大小.其中按照启动tomcat的不同方式,分如下三种情况 a ...

  5. jvm 内存溢出 在myeclipse中加大tomcat的jvm内存 java.lang.OutOfMemoryError: PermGen space

    使用myeclipse启动两个SSH2的部署在tomcat6下的项目 报出java.lang.OutOfMemoryError: PermGen space 解决办法: 在myeclipse中加大jv ...

  6. 【转载】java项目中经常碰到的内存溢出问题: java.lang.OutOfMemoryError: PermGen space, 堆内存和非堆内存,写的很好,理解很方便

    Tomcat Xms Xmx PermSize MaxPermSize 区别 及 java.lang.OutOfMemoryError: PermGen space 解决 解决方案 在 catalin ...

  7. 开发部署项目时出现:java.lang.OutOfMemoryError: PermGen space

    java.lang.OutOfMemoryError: PermGen space 错误: 原文地址:http://www.cnblogs.com/shihujiang/archive/2012/06 ...

  8. Eclipse中启动tomcat: java.lang.OutOfMemoryError: PermGen space的解决方法

    tomcat启动的时候出现这种错误一般是项目引用了太多的jar包,或者反射生成了太多的类,或者有太多的常量池,导致非堆内存中永久保存区域不够,就有可能会报java.lang.OutOfMemoryEr ...

  9. 在eclipse中启动项目报java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space

    在我们启动项目的时候经常会出现内存溢出这个错误  设置一下内存就ok 错误信息 java.util.concurrent.ExecutionException: java.lang.OutOfMemo ...

随机推荐

  1. JavaScript基本操作

    一.如何编写? 1.JavaScript代码存在形式 <!-- 方式一 --> <script type="text/javascript" src=" ...

  2. My97DatePicker 日期控制,开始时间不能&gt;结束时间,结束时间不能&lt;开始时间

    <li>日期: <input type="text" style="margin-top: 5px;" value="${begin ...

  3. 1031MVCC和事务浅析

    转自 http://blog.csdn.net/sofia1217/article/details/50778906 关于MVCC浅析,有些难度http://xuebinbin212.blog.163 ...

  4. hdoj 2031 进制转换

    进制转换 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  5. Cmake ,Out of Source Build

    Out of Source build呢,就是让Cmake产生的临时垃圾文件,不关乎于项目实际本身的文件放到一个目录里,一般我们把这个目录放在项目根目录(也可以认为是根CmakeLists.txt)下 ...

  6. vue2.0 通过v-html指令渲染的富文本无法修改样式的解决方案

    在最近的vue项目中遇到的问题:v-html渲染的富文本,无法在样式表中修改样式: 比如下面的代码,div.descBox里面的p标签的color样式并不是"color: blue" ...

  7. Page Visibility API 页面是否获取焦点 Event: visibilitychange

    W3C 文档 https://www.w3.org/TR/page-visibility/ MDN 文档 https://www.w3.org/TR/page-visibility/ // Docum ...

  8. 《Mysql DML语句》

    1:DISTINCT 用于去重,但是需要注意的是,它是用于所有列的,也就是说,除非指定的列全部相同,否则所有的行都会被检索出来. 2:ORDER BY 用于排序,但是应该注意的是,它因该是 SELEC ...

  9. JavaSE习题 第八章 线程

    问答题 1.线程和进程是什么关系? 进程是程序的一次动态执行,对应了从代码加载,执行至执行完毕的一个完整的过程 线程是比进程更小的执行单位,一个进程在其执行过程中可以产生多个线程,形成多条执行线索 2 ...

  10. 重载方法写delete请求

    #encoding=utf-8#__author__="Lanyangyang" import unittestimport requestsimport json # This ...