Bug 54566

Summary: ZipException was caught broken uncompressed block
Product: POI Reporter: Murali Krishna <muralinit>
Component: XWPFAssignee: POI Developers List <dev>
Status: RESOLVED INVALID    
Severity: major    
Priority: P2    
Version: 3.10-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Murali Krishna 2013-02-15 14:04:43 UTC
Dear POITeam,

I have got a requirement. My 1.docx file contains 2.docx as embedded object. When I try to read the 2.docx by saving to disk and when I try to read everything is going fine.

Where as my requirement is I will read the 2.docx file using packagePart.getInputStream() and I will get the byte array and I will store it some where in the database. Again when I want to read the stored document from byte[] I am getting the below exception ZIPException was caught broken uncompressed file.

I am using the below code to get the extractor:
ExtractorFactory.createExtractor(OPCPackage.open(new ByteArrayInputStream(fileData, 0, fileData.Length)));

Remember I want to read the embedded document(2.docx which is inside 1.docx)using byte[] not from InputStream. Please guide me if I am doing anything wrong here.

Thanks & Regards,
N.Murali Krishna.
Comment 1 Dominik Stadler 2016-07-26 19:28:47 UTC
It's probably too long since the original bug-report, but can you provide a sample document that shows this together with all the code that is necessary to reproduce the exception?
Comment 2 Javen O'Neal 2017-01-05 12:59:27 UTC
Not enough information to reproduce the bug. No response in half a year, so closing this bug. Please reopen if you can provide code and docx files so that someone can reproduce this issue.