java - Apache POI 发生了非法的反射访问操作

标签 java apache-poi java-9

我正在使用 Apache POI 处理 excel 文件,根据这篇文章 JDK9: An illegal reflective access operation has occurred. org.python.core.PySystemState,从 Java 9 开始我收到这条消息我们应该等待开发人员解决这个问题,但我应该在我的新生产版本中保留它吗?我认为如果我跳过警告应该没有问题。

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”依赖项。它将解决所有上述警告。

<!-- 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>

关于java - Apache POI 发生了非法的反射访问操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50071996/

相关文章:

java - 包 javax.jnlp 在模块 java.jnlp 中声明,它不在模块图中

java - 用于批处理的单个准备语句

java - Struts2 - 具有多种方法的 Action ?

java - 动态确定对象的变量名?

java - 在 EJB 中打开文件

jar - 如何使用 JDK 9 jar 工具的 --hash-modules 和 --module-path 选项?

java - 使用 JIRA REST API 通过电子邮件地址查找 JIRA 用户

java - Apache POI 边框样式不起作用

java - 在 Java 中使用 POI 时如何增加 Excel 计算引擎的限制?

java - jol 在 Java9 下是不是有点坏了?