https://bz.apache.org/bugzilla/show_bug.cgi?id=70142
Bug ID: 70142
Summary: POI 5.2.2 throws a RecordFormatException while opening
an XLSX workbook due to the 100,000,000-byte
allocation limit enforced by
IOUtils.toByteArrayWithMaxLength().
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Environment
Apache POI 5.2.2
XLSX workbook
Exception occurs while opening the workbook (before worksheet processing
begins)
Exception:
org.apache.poi.util.RecordFormatException:
Tried to read data but the maximum length for this record type is 100,000,000.
If the file is not corrupt or large, please open an issue on bugzilla to
request increasing the maximum allowable size for this record type.
As a temporary workaround, consider setting a higher override value with
IOUtils.setByteArrayMaxOverride()
at org.apache.poi.util.IOUtils.throwRecordTruncationException(IOUtils.java:610)
at org.apache.poi.util.IOUtils.toByteArray(IOUtils.java:249)
at org.apache.poi.util.IOUtils.toByteArrayWithMaxLength(IOUtils.java:220)
at
org.apache.poi.openxml4j.util.ZipArchiveFakeEntry.<init>(ZipArchiveFakeEntry.java:81)
at
org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:98)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:132)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:312)
The workbook contains large worksheet XML parts.
Observed behavior:
A worksheet with decompressed sheet2.xml size of approximately 158 MB can be
successfully generated and updated.
Historical processing has successfully handled worksheet XML sizes of
approximately 260 MB.
The failure is sequence-dependent: executing workbook update jobs in a
different order allows successful completion with the same large worksheet
content.
Our application cannot reasonably determine an appropriate value for
IOUtils.setByteArrayMaxOverride() because input workbook sizes are
customer-dependent and can vary significantly. We are therefore requesting
guidance on whether the 100,000,000-byte limit encountered while opening OOXML
packages in POI 5.2.2 has been revised, made configurable, or otherwise
improved in later POI releases (e.g. 5.4.1 or later?).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]