Bug 59776 - ZipPackagePropertiesMarshaller exception handling swallows root cause
Summary: ZipPackagePropertiesMarshaller exception handling swallows root cause
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: 3.15-dev
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2016-07-01 09:10 UTC by Javen O'Neal
Modified: 2017-10-31 11:12 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2016-07-01 09:10:10 UTC
Reported by Andrei Ivanov on user mailing list [1].
> But I still think it would be nice for the root exception to be
> preserved, for future cases, to avoid guessing.

[1] http://apache-poi.1045710.n5.nabble.com/Fail-to-save-stream-td5723711.html
Comment 1 Javen O'Neal 2016-07-01 09:15:29 UTC
Include cause in OpenXML4JException in r1750893.
Comment 2 Andrei Ivanov 2016-07-01 09:17:30 UTC
Wow, amazing response.
Thank you :-)
Comment 3 David North 2016-07-08 08:05:05 UTC
Javen, can we close this now?
Comment 4 Javen O'Neal 2016-07-08 08:56:47 UTC
I left it open because there's no unit test to verify this was fixed nor verification from Andrei that this fixed the problem [1].

There isn't currently a unit test class for ZipPackagePropertiesMarshaller and we don't have a file that can trigger this error.

If Andrei is waiting for the next release to test the change, then we might as well close it.

[1] http://apache-poi.1045710.n5.nabble.com/Fail-to-save-stream-tp5723711p5723731.html
Comment 5 Abhishek Kumar 2017-04-28 11:54:38 UTC
Hi Team,

I am still facing the issue again,after upgrading my poi version to 3.15.

Fail to save: an error occurs while saving the package : The part /docProps/app.xml fail to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.DefaultMarshaller@3224e66a

Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JException: The part /docProps/app.xml fail to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.DefaultMarshaller@3224e66a
	at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:440)
	at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1375)
	at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:179)

Request your help.

Comment 6 kumai 2017-10-31 08:40:24 UTC

I`m facing the same issue. My poi version is v3.15. I do not know how can I reproduce this problem. 
Does anyone know how to reproduce this problem? 
Should I downgrade to v3.14?

Best regards,
Ryosuke Kumai.
Comment 7 PJ Fanning 2017-10-31 08:48:06 UTC
Hi Ryosuke,
Can you provide a test case to help us debug and hopefully fix the problem?

Comment 8 Javen O'Neal 2017-10-31 08:53:20 UTC
This scope of this bug is to not swallow the exception cause. This was fixed in r1750893, which was included in 3.15 beta 3 and future releases.

The issues from comment 5 and comment 6 appear to be for reasons other than a swallows exception cause. Please open up new bugs for different issues.
Comment 9 kumai 2017-10-31 11:12:58 UTC
Hi PJ,

I made a mistake.
Sorry, I am in trouble because I do not know how to reproduce it. I created the following tickets.