An illegal reflective access operation has occurred Apache POI

前端 未结 2 863
粉色の甜心
粉色の甜心 2020-12-30 13:23

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

相关标签:
2条回答
  • 2020-12-30 13:53

    The error I encountered was : WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/D:/Libary/poi-3.12/poi-ooxml-3.12-20150511.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

    please use poi-3.6 or a later version,I use poi-3

    0 讨论(0)
  • 2020-12-30 14:18

    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>
    
    0 讨论(0)
提交回复
热议问题