发生了非法的反射访问操作Apache POI [英] An illegal reflective access operation has occurred Apache POI

查看:1519
本文介绍了发生了非法的反射访问操作Apache POI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据该帖子,我使用Apache POI处理excel文件,从Java 9开始,我收到此消息

I'm using Apache POI to work with excel files, as of Java 9 I get this message, according to this post JDK9: An illegal reflective access operation has occurred. org.python.core.PySystemState we should wait for the developer to fix the issue, but should I leave it like that in my new production version? I think it shouldn't be a problem if I skip the warning.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/T:/Workspace/Java/Sections%20Manager/libs/poi/poi-ooxml-3.17.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.DocumentHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

推荐答案

添加更新的"poi-ooxml"依赖项.它将解决以上所有警告.

Add the updated "poi-ooxml" dependency. It will resolve all the above warnings.

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>4.1.0</version>
</dependency>

这篇关于发生了非法的反射访问操作Apache POI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆