Bug 63270 - Issue related to ClassCastException which we are facing while using poi-3.15 along with java 11.
Summary: Issue related to ClassCastException which we are facing while using poi-3.15 ...
Status: RESOLVED DUPLICATE of bug 62187
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 10:02 UTC by Sushmita Nag
Modified: 2019-03-19 15:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sushmita Nag 2019-03-19 10:02:50 UTC
This is regarding an issue related to ClassCastException which we are facing while using poi-3.15 along with java 11.

org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : class org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to class java.util.zip.ZipFile$ZipFileInputStream (org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @6e1d8f9e; java.util.zip.ZipFile$ZipFileInputStream is in module java.base of loader 'bootstrap')

Caused by: java.lang.ClassCastException: class org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to class java.util.zip.ZipFile$ZipFileInputStream (org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @6e1d8f9e; java.util.zip.ZipFile$ZipFileInputStream is in module java.base of loader 'bootstrap')


This is occurring while trying to manipulate .xlsx. Could you please help us resolving the same ?

Regards,
Sushmita
Comment 1 Greg Woolsey 2019-03-19 15:09:02 UTC
This is fixed in POI 4.0.0.  See issue #62187.

*** This bug has been marked as a duplicate of bug 62187 ***