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

问题描述 投票:3回答:1

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

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
java apache-poi java-9
1个回答
0
投票

我遇到的错误是:警告:发生了非法反射访问操作警告:org.apache.poi.util.DocumentHelper非法反射访问(文件:/ D:/Libary/poi-3.12/poi-ooxml-3.12-20150511 .jar)方法com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)警告:请考虑将此报告给org.apache.poi.util.DocumentHelper的维护者警告:使用--legal -access =警告以启用进一步非法反射访问操作的警告警告:将来的版本中将拒绝所有非法访问操作

请使用poi-3.6或更高版本,我使用poi-3

© www.soinside.com 2019 - 2024. All rights reserved.