poi 做数据导出,数据大就会报内存溢出,求解(目前我的数据肯能会在15W笔)

java.lang.OutOfMemoryError:Javaheapspaceatorg.apache.poi.poifs.storage.DocumentBlock.... java.lang.OutOfMemoryError: Java heap space
at org.apache.poi.poifs.storage.DocumentBlock.<init>(DocumentBlock.java:86)
at org.apache.poi.poifs.storage.DocumentBlock.<init>(DocumentBlock.java:73)
at org.apache.poi.poifs.filesystem.POIFSDocument.<init>(POIFSDocument.java:146)
at org.apache.poi.poifs.filesystem.DirectoryNode.createDocument(DirectoryNode.java:269)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.createDocument(POIFSFileSystem.java:126)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:908)
at org.springframework.web.servlet.view.document.AbstractExcelView.renderMergedOutputModel(AbstractExcelView.java:153)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
at java.lang.Thread.run(Thread.java:619)
展开
 我来答
gj495147916
2012-02-21 · TA获得超过214个赞
知道答主
回答量:126
采纳率:0%
帮助的人:79.4万
展开全部
调整tomcat bin目录下的catalina.bat

set JAVA_OPTS=-Xms64m -Xmx1400m
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式