Bug 57292 - APache POI 3.9 work
Summary: APache POI 3.9 work
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC All
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2014-12-01 11:22 UTC by Suyog
Modified: 2014-12-01 16:29 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Suyog 2014-12-01 11:22:02 UTC
Hi All,

Below is my code to read xlsm file :

byte[] filedata = attachmentValue.getFileData();
			InputStream inputFileStream = new ByteArrayInputStream(filedata);
	        //Create Workbook instance for xlsx/xls file input stream
	        Workbook workbook = null;

  workbook = WorkbookFactory.create(inputFileStream);

This code work well upto 5 MB. But after that throwing Out Of Memory Exception.

I am using POI 3.9 jars

Please suggest.
Comment 1 Nick Burch 2014-12-01 13:06:47 UTC
This should be covered in this FAQ Entry - http://poi.apache.org/faq.html#faq-N10109
Comment 2 Suyog 2014-12-01 16:29:29 UTC
Heap dumps are getting genarted :

A Linked List Data Structure Detected.
 466,985,128 bytes (51.13 %) of Java heap is used by 489,034 instances of org/apache/xmlbeans/impl/store/Xobj$ElementXobj
 Contains 3 types of the following objects:
 - 489,034 instances of javax/xml/namespace/QName holding 39,122,672 bytes
 - 489,035 instances of org/apache/xmlbeans/impl/store/Xobj$AttrXobj holding 43,037,568 bytes
 - 489,034 instances of org/apache/xmlbeans/impl/store/Locale holding 684,647,600 bytes