ZipSecureFile$ThresholdInputStream cannot be cast to java.base/java.util.zip.ZipFile$ZipFileInputStream

使用apache.poi导出excel文件的时候会报这个错误

 Caused by: java.lang.ClassCastException: 
org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to java.base/java.util.zip.ZipFile$ZipFileInputStream

百度之后发现只有一条有用的链接。

https://bz.apache.org/bugzilla/show_bug.cgi?id=62187

 

然后检查IDEA的使用的是JAVA11。我原来的项目是用eclipse开发的 使用的是本机的java8。

所以切换IDEA的JDK为 java8后问题得到解决。

 

 

posted @ 2020-04-26 23:17  迷神图卷  阅读(1757)  评论(0编辑  收藏  举报