[英]Java heap space memory error while while downloading JR report
I am fetching data from data base (records in table 911830) and adding it to JR report for 1000 records its working fine. 我正在从数据库(表911830中的记录)中获取数据,并将其添加到JR报告中以获取1000条记录,其工作正常。 When I exceed or some time its giving Java heap space memory error as title of this issue it is related to Java heap memory, but I increase it 3Gb as (Xms3072m-Xmx3072m). 当我超过或在某个时候将其赋予Java堆空间内存错误作为此问题的标题时,它与Java堆内存有关,但我将其增加了3Gb(Xms3072m-Xmx3072m)。 But still getting same error 但是仍然出现相同的错误
My system configuration is as below:: 我的系统配置如下:
console error :: 控制台错误::
Aug 26, 2012 7:11:14 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet `enter code here`jsp threw exception
java.lang.OutOfMemoryError: Java heap space
at com.opensymphony.module.sitemesh.html.util.CharArray.grow(CharArray.java:267)
at com.opensymphony.module.sitemesh.html.util.CharArray.append(CharArray.java:117)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser$ReusableToken.writeTo(Parser.java:343)
at com.opensymphony.module.sitemesh.html.State.handleText(State.java:64)
at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.text(HTMLProcessor.java:103)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedText(Parser.java:295)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.java:109)
at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(TagTokenizer.java:33)
at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProcessor.java:90)
at com.opensymphony.module.sitemesh.parser.HTMLPageParser.parse(HTMLPageParser.java:52)
at com.opensymphony.sitemesh.compatability.PageParser2ContentProcessor.build(PageParser2ContentProcessor.java:51)
at com.opensymphony.sitemesh.webapp.ContentBufferingResponse.getContent(ContentBufferingResponse.java:54)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:137)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:143)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
Aug 26, 2012 7:11:14 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.OutOfMemoryError: Java heap space
at com.opensymphony.module.sitemesh.html.util.CharArray.grow(CharArray.java:267)
at com.opensymphony.module.sitemesh.html.util.CharArray.append(CharArray.java:117)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser$ReusableToken.writeTo(Parser.java:343)
at com.opensymphony.module.sitemesh.html.State.handleText(State.java:64)
at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.text(HTMLProcessor.java:103)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedText(Parser.java:295)
at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.java:109)
at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(TagTokenizer.java:33)
at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProcessor.java:90)
at com.opensymphony.module.sitemesh.parser.HTMLPageParser.parse(HTMLPageParser.java:52)
at com.opensymphony.sitemesh.compatability.PageParser2ContentProcessor.build(PageParser2ContentProcessor.java:51)
at com.opensymphony.sitemesh.webapp.ContentBufferingResponse.getContent(ContentBufferingResponse.java:54)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:137)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:143)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
Have you tried to profile your application? 您是否尝试过分析您的应用程序?
Try to take a memory dump and investigate, maybe you have too many objects in memory of the same type/ some very big objects that eats all your memory. 尝试进行内存转储并进行调查,也许您的相同类型的内存中有太多对象/一些非常大的对象已耗尽了您的所有内存。
You can consider to use JVisualVM or any other profile available at your organization 您可以考虑使用JVisualVM或组织中可用的任何其他配置文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.