Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333463

Summary: java.lang.OutOfMemoryError when creating Doc (wpml) with large result set
Product: z_Archived Reporter: a.dwehus
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: a.dwehus, bluesoldier
Version: 2.6.0   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
sample report none

Description a.dwehus CLA 2011-01-04 06:59:57 EST
Build Identifier: 20100617-1415

We are using Citrix to access our application, therefore the memory for each user is limited (on the test system to 256MB). This seems to lead to an outOfMemoryError when generating Word Documents, if the result set gets to big (in our case about 460 pages with 8724 result rows). When generating a pdf with the same report and results it is working fine.

This is what courses the error:

java.lang.OutOfMemoryError: Java heap space
java.util.Arrays.copyOf(Unknown Source)
java.io.ByteArrayOutputStream.write(Unknown Source)
org.eclipse.birt.report.engine.emitter.EmitterUtil$EmitterOutputStream.write(EmitterUtil.java:135)
sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
sun.nio.cs.StreamEncoder.implWrite(Unknown Source)
sun.nio.cs.StreamEncoder.write(Unknown Source)
java.io.OutputStreamWriter.write(Unknown Source)
org.eclipse.birt.report.engine.emitter.XMLWriter.print(XMLWriter.java:463)
org.eclipse.birt.report.engine.emitter.XMLWriter.attribute(XMLWriter.java:218)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.writeBorderProperty(AbstractWordXmlWriter.java:315)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.writeSingleBorder(AbstractWordXmlWriter.java:308)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.writeBorders(AbstractWordXmlWriter.java:289)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.writeCellBorders(AbstractWordXmlWriter.java:806)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.writeCellProperties(AbstractWordXmlWriter.java:791)
org.eclipse.birt.report.engine.emitter.wpml.writer.AbstractWordXmlWriter.startTableCell(AbstractWordXmlWriter.java:669)
org.eclipse.birt.report.engine.emitter.wpml.AbstractEmitterImpl.startCell(AbstractEmitterImpl.java:455)
org.eclipse.birt.report.engine.emitter.wpml.DocEmitter.startCell(DocEmitter.java:255)
org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startCell(CompositeContentEmitter.java:233)
org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startCell(HTMLTableLayoutEmitter.java:701)
org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:59)
org.eclipse.birt.report.engine.layout.html.buffer.ContainerBufferNode.start(ContainerBufferNode.java:83)
org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:113)
org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:286)
org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67)
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139)
org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)

Reproducible: Always

Steps to Reproduce:
1.Create a simple report with a simple output table.
2.View report as doc (make sure the maximum number if data rows is not limited as it is by default in the report designer) with very large number of results.
Comment 1 Xiaoying Gu CLA 2011-02-24 02:03:54 EST
Were you using the ALL-In-One or genReport to render the report?
Comment 2 Xiaoying Gu CLA 2011-03-07 04:08:16 EST
I can not reproduce this issue in the rcp designer with the 2.6.0 release. 
The -Xmx had been set to 256M to simulate your memory setting.

The doc file was exported correctly. Please see my attachment which was using the sample database.
Comment 3 Xiaoying Gu CLA 2011-03-07 04:09:31 EST
Created attachment 190520 [details]
sample report
Comment 4 Xiaoying Gu CLA 2011-03-11 01:44:23 EST
Set as worksforme.

Please feel free to reopen if there is any more information.