本文介绍了Apache POI 发生了非法的反射访问操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Apache POI 处理 excel 文件,从 Java 9 开始,我收到此消息,根据这篇文章 JDK9:发生了非法的反射访问操作.org.python.core.PySystemState 我们应该等待开发人员解决这个问题,但我应该在我的新生产版本中保留它吗?如果我跳过警告,我认为应该没有问题.
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 发生了非法的反射访问操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!