poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seb Duggan <seb.dug...@pixl8.co.uk>
Subject Corrupted xlsx file on just one server
Date Thu, 07 Sep 2017 10:35:49 GMT
Hi POI people...

I'm seeing a very strange issue where .xlsx files generated via POI on our
live server are corrupted, whereas on all dev and staging environments they
work absolutely fine.

I created a minimal test case, where I create an
empty org.apache.poi.xssf.usermodel.XSSFWorkbook (I'm using POI 3.16) with
a single sheet called "Sheet1". I then send this to the user as a binary
file.

I have attached the "good" and "bad" files. I opened up the .xlsx files to
examine their contents and noticed the following differences in
[Content_Type].xml:

GOOD:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default
ContentType="application/vnd.openxmlformats-package.relationships+xml"
Extension="rels"/>
<Default ContentType="application/xml" Extension="xml"/>
<Override
ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"
PartName="/docProps/app.xml"/>
<Override
ContentType="application/vnd.openxmlformats-package.core-properties+xml"
PartName="/docProps/core.xml"/>
<Override
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
PartName="/xl/sharedStrings.xml"/>
<Override
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
PartName="/xl/styles.xml"/>
<Override
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
PartName="/xl/workbook.xml"/>
<Override
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
PartName="/xl/worksheets/sheet1.xml"/>
</Types>

BAD:

<?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
<Types>
   <Default Extension="rels"
ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
   <Default Extension="xml" ContentType="application/xml"/>
   <Override PartName="/docProps/app.xml"
ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
   <Override PartName="/docProps/core.xml"
ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
   <Override PartName="/xl/sharedStrings.xml"
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>
   <Override PartName="/xl/styles.xml"
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>
   <Override PartName="/xl/workbook.xml"
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>
   <Override PartName="/xl/worksheets/sheet1.xml"
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>
</Types>

Notice the differences in the first two lines...

There is a minimal difference in the Java version on the servers: my local
computer is running 1.8.0_112, staging is running 1.8.0_45, and live
(producing the corrupt files) is on 1.8.0_66. All are Oracle 64-bit.

Can anyone think of what might be causing the difference in output between
the servers? I've been banging my head against this now for a couple of
days!


Thanks,

Seb



--



Seb Duggan
Senior Developer

Pixl8 Interactive, 3 Tun Yard,
Peardon Street, London, SW8 3HT
+44 (0) 207 720 4545 <020%207720%204545>
www.pixl8.co.uk

<http://www.facebook.com/pixl8>     <http://www.twitter.com/pixl8>
<http://www.linkedin.com/company/pixl8-interactive>

CONFIDENTIAL AND PRIVILEGED - This e-mail and any attachment is intended
solely for the addressee, is strictly confidential and may also be subject
to legal, professional or other privilege or may be protected by work
product immunity or other legal rules. If you are not the addressee please
do not read, print, re-transmit, store or act in reliance on it or any
attachments.
Instead, please email it back to the sender and then immediately
permanently delete it. Pixl8 Interactive Ltd Registered in England.
Registered number: 04336501. Registered office: 8 Spur Road, Cosham,
Portsmouth, Hampshire, PO6 3EB

Mime
View raw message