poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: POI 4.0 SXSSF: This archive contains unclosed entries
Date Wed, 31 Oct 2018 19:09:20 GMT
Hi,

Thanks for the report, sounds like a problem introduced by moving from
pure-Java ZIP to the ZIP-classes from commons-compress (this was necessary
for Zip-Bomb-Protection with newer Java versions).

However I could not reproduce this with a quick test, also our default
performance-test in class SSPerformanceTest does not show this problem when
called with "SXSSF 300000 20 1", so there seems to be something more that
is needed to trigger the exception.

Maybe you are closing something too early here, e.g. the workbook itself?

If you can provide a ready-to-run sample then please open a bug-report at
https://bz.apache.org/bugzilla/ and include some code that you use to
trigger this?

Thanks... Dominik.

On Wed, Oct 31, 2018 at 3:08 PM Andreas Reichel <
andreas@manticore-projects.com> wrote:

> We have tested our particular use case 3 times each with 4.0 and 3.17
> (exactly the same code, exactly the same data). While 3.17 works w/o
> any adjustments, 4.0 throws this error and leaves an invalid XLSX file.
> Best regardsAndreas
> On Wed, 2018-10-31 at 18:42 +0700, Andreas Reichel wrote:
> > Dear All,
> > the new 4.0 seems to have a problem when writing large XLSX files
> > (e.g. >100k rows but less than 1 Mill. rows) using SXSSFWorkbook:
> > java.io.IOException: This archive contains unclosed
> > entries.        at
> > org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.fini
> > sh(ZipArchiveOutputStream.java:467)        at
> > org.apache.poi.xssf.streaming.SXSSFWorkbook.injectData(SXSSFWorkbook.
> > java:406)        at
> > org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:
> > 936)
> > Please note, small files (e.g. less than 100k rows seem to work fine)
> > and also everything works fine with 3.18 (same code, same data).Also,
> > other people seem to have this problem:
> >
> https://stackoverflow.com/questions/53080171/java-apache-poi-and-large-result-set-from-db2-runs-into-exception
> > My suspision is that the Workbook is closed before the ZIP stream is
> > ready?Thank you already for helping, best regards
> > Andreas
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message