平台运行过程中,出现如下情况:Java heap space
- 2011-4-22 16:52:39 org.apache.catalina.core.ApplicationDispatcher invoke
- 严重: Servlet.service() for servlet jsp threw exception
- java.lang.OutOfMemoryError: Java heap space
- 16:52:39,828 ERROR DispatcherUtils:245 - Could not execute action
- javax.servlet.ServletException: java.lang.OutOfMemoryError: Java heap space
- at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
- at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
- at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
- at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
- at com.opensymphony.webwork.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:114)
- at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:101)
- at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:312)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:207)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:100)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)
- at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:233)
- at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:198)
- at cn.myapps.base.web.filter.OBPMFilterDispatcher.doFilter(OBPMFilterDispatcher.java:43)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:78)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.AjaxMultiLanguageFilter.doFilter(AjaxMultiLanguageFilter.java:40)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.PersistenceFilter.doFilter(PersistenceFilter.java:30)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.SecurityFilter.doFilter(SecurityFilter.java:125)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
- at java.lang.Thread.run(Thread.java:619)
- Caused by: java.lang.OutOfMemoryError: Java heap space
- 16:52:39,828 ERROR OBPMFilterDispatcher:48 - URL: /vos2_4/core/role/list.action
- javax.servlet.ServletException: Could not execute action
- at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:246)
- at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:198)
- at cn.myapps.base.web.filter.OBPMFilterDispatcher.doFilter(OBPMFilterDispatcher.java:43)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:78)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.AjaxMultiLanguageFilter.doFilter(AjaxMultiLanguageFilter.java:40)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.PersistenceFilter.doFilter(PersistenceFilter.java:30)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at cn.myapps.base.web.filter.SecurityFilter.doFilter(SecurityFilter.java:125)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
- at java.lang.Thread.run(Thread.java:619)
- Caused by: javax.servlet.ServletException: java.lang.OutOfMemoryError: Java heap space
- at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
- at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
- at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
- at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
- at com.opensymphony.webwork.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:114)
- at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:101)
- at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:312)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:207)
- at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
- at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)
- ...
- Caused by: java.lang.OutOfMemoryError: Java heap space
解决方案:
- windows 下 tomcat 虚拟内存配置
- 在tomcat的bin目录下,找到catalina.bat 文件,打开,在最上面添加这样一句:
- set JAVA_OPTS=-Xms256m -Xmx512m
- Eclipse中设置tomcat 虚拟内存配置
- Windows --> Preferences-->MyEclipse--->Tomcat-->Tomcate x.x --> JDK 中
- Optional java vm arguments中加入 -Xms256m -Xmx512m
- 注意:不同方式的tomcat启动,其虚拟内存取决于当前的配置,比如 tomcat中设置了,而Myeclipse中未设置,则在myeclipse启动tomcat 其虚拟内存 还是未改变,仍然为默认值64M
- linux 下tomcat 虚拟内存配置
- 在tomcat的bin目录下,找到catalina.bat 文件,打开,在最上面添加这样一句:
- JAVA_OPTS='-Xms256m -Xmx512m'
- 表示初始化内存为256MB,可以使用的最大内存为512MB。
参考网址:
http://yushan.iteye.com/blog/345456
测试无效的方法:
解决方法:手动设置Heap size
1.如果是unix/linux操作系统:
修改TOMCAT_HOME/bin/catalina.sh
在“echo "Using CATALINA_BASE: $CATALINA_BASE"”上面加入以下行:
相关推荐
标题中的“tomcat 解决Java heap space问题”指的是在运行Apache Tomcat服务器时,由于Java应用程序内存分配不当或资源消耗过大导致的“Java heap space”错误。这个问题通常出现在Java虚拟机(JVM)试图为对象分配...
其中,“java.lang.OutOfMemoryError: Java heap space”是一种常见的异常情况,它表明Java虚拟机(JVM)的堆内存空间已耗尽。 #### 标题和描述中的知识点详解 **标题:“java错误处理:java.lang.OutOfMemoryError:...
"Java.lang.OutOfMemoryError: Java heap space 解决...Java.lang.OutOfMemoryError: Java heap space 是一种常见的 Java 错误,解决该问题需要从多方面入手,包括调整 JVM 的堆大小、调整 Tomcat 的配置、优化程序等。
### 解决Java_heap_space问题:深入理解与策略 在Java应用程序开发与运行过程中,经常会遇到一个常见的内存管理问题——“Java heap space”。这个问题通常表现为Java虚拟机(JVM)在执行过程中因可用堆内存不足而...
### Java Heap Space 异常详解及解决方案 #### 标题:Java 抛出 Java Heap Space 错误 在 Java 应用程序运行过程中,如果出现内存不足的情况,JVM(Java虚拟机)会抛出 `java.lang.OutOfMemoryError: Java heap ...
### 编译时出现java.lang.OutOfMemoryError Java heap space异常 #### 一、问题概述 在进行Java项目编译的过程中,可能会遇到`java.lang.OutOfMemoryError: Java heap space`这种异常。这类异常通常表明Java虚拟机...
通过以上方法,通常可以有效解决Myeclipse下出现的`java.lang.OutOfMemoryError: Java heap space`问题。需要注意的是,在调整JVM参数时应当根据实际情况合理设置,以免造成资源浪费或者性能下降。同时也要持续关注...
Java程序在运行过程中可能会遇到各种异常,其中"nested exception is java.lang.OutOfMemoryError: Java heap space"是一个常见的问题,通常发生在程序试图分配超过堆内存限制的空间时。这个错误表明Java虚拟机(JVM...
根据描述中的内容,“Java heap space 解决方法,解决tomcat堆栈溢出问题”,我们可以推断出问题的根源在于Tomcat服务器在运行时出现了堆内存溢出的情况。 ##### 2. 解决方案 为了有效地解决这个问题,我们需要调整...
### Java Heap Space 解决方法详解 #### 一、引言 在Java应用程序运行过程中,经常会遇到“Out of Memory Error: Java Heap Space”的错误提示。这种错误通常发生在Java虚拟机(JVM)的堆内存不足时,导致程序无法...
如果您的tomcat是6.X版本且是安装版的,那么系统设置环境变量是不起作用的,因为这个版本的只能通过点击tomcat6.exe 或tomcat6w.exe才能执行,这种方法可以通过修改注册表能解决:本例是以内存3G为例的。 windows...
Java虚拟机(JVM)是Java应用程序的运行环境,它负责执行字节码并管理内存...通过上述方法,可以有效地预防和解决`java.lang.OutOfMemoryError: Java heap space`问题,优化JVM内存管理,提升应用程序的稳定性和性能。
在 Eclipse 中通过 Tomcat 运行 J2EE 项目时,可能会出现 java.lang.OutOfMemoryError: PermGen space 异常,这是由于 JVM 默认分配的运行空间过小,导致 J2EE 项目加载的类过多,造成内存溢出。 PermGen space 是...
在Java应用程序开发与维护过程中,经常会遇到`java.lang.OutOfMemoryError: Java heap space`这一异常情况。该异常通常表明Java虚拟机(JVM)的堆内存不足以支持当前程序运行所需的内存分配请求。本文将详细介绍该...
根据提供的信息,这个错误主要涉及到两个方面:`PermGen space`和`Java heap`,并且与Tomcat服务器相关。 首先,让我们详细讨论`PermGen space`。 PermGen(Permanent Generation)是Java虚拟机(JVM)的一个内存...
在Tomcat中java.lang.OutOfMemoryError: Java heap space异常处理: 1. Heap size JVM堆的设置是指Java程序运行过程中JVM可以调配使用的内存空间的设置。 2. JVM在启动的时候会自动设置Heap size的值,其初始空间...