Bug 54566 - ZipException was caught broken uncompressed block
Summary: ZipException was caught broken uncompressed block
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.10-dev
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-15 14:04 UTC by Murali Krishna
Modified: 2017-01-05 12:59 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.