https://bz.apache.org/bugzilla/show_bug.cgi?id=65865

            Bug ID: 65865
           Summary: java.util.zip.ZipException reading xlsx file created
                    with SXSSFWorkbook
           Product: POI
           Version: 5.1.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 38182
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38182&action=edit
unit test that creates an xlsx file with XSSFWorkbook and SXSSFWorkbook and
uses ZipInputStream to read the entries

A java.util.zip.ZipException occurs when reading the entries of an xlsx zip
file created with SXSSFWorkbook after 5.0.0.
The error does not occur on xlsx zip files created with XSSFWorkbook after
5.0.0.
The error does not occur on xlsx zip files created with either class in 4.2.2
and below

The size of the [ContentTypes].xml appears to be incorrect in the zip entry.

java.util.zip.ZipException: invalid entry size (expected 0 but got 1053 bytes)
        at
java.base/java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:398)
        at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:197)
        at com.e2open.issues.poi.XSSFZipTest.readEntry(XSSFZipTest.java:121)
        at
com.e2open.issues.poi.XSSFZipTest.testSXSSFWorkbook(XSSFZipTest.java:56)

I've attached a unit test that demonstrates the error.
The unit test attempts to read the [ContentTypes].xml file.
It is able on the workbook created by XSSFWorkbook but unable for the
SXSSFWorkbook.

Note that the error also occurs if simply trying to iterate the zip entries via
ZipInputStream.nextEntry() and ZipInputSTream.closeEntry().

-- 
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]

Reply via email to