R XLConnect:loadWorkbook 警告 - “发生非法反射访问操作" [英] R XLConnect: loadWorkbook warnings - "An illegal reflective access operation has occurred"

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

问题描述

我正在使用 XLConnect 读取 R(版本 3.4.4)中的 xlsx 文件,但我收到以下警告.我认为它们可能与 Java 相关,但我不是 Java 用户,我不知道如何让它们消失.谢谢!

I am using XLConnect to read in xlsx files in R (version 3.4.4), but I get the warnings below. I think they might be related to Java, but I am not a Java user, and I do not know how to make them go away. Thanks!

带有任何 xlsx 文件的 MWE:

MWE with any xlsx file:

library(XLConnect)
infile <- 'any.xlsx'
wb <- loadWorkbook(infile)
mydf <- readWorksheet(wb, sheet=1, region='A1:AS91', header=TRUE, check.names=FALSE, useCachedValues=TRUE)

警告:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.openxml4j.util.ZipSecureFile$1 (file:/usr/local/lib/R/site-library/XLConnect/java/poi-ooxml-3.17.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of org.apache.poi.openxml4j.util.ZipSecureFile$1
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 9 或更新版本,不是吗?

From the error report, I would tell you are using Java 9 or more recent, isn't it?

此警告源自的下一个 Apache POI 4.0.0 版本将解决此问题.

This will be solved with the next release of Apache POI 4.0.0 where this warning originates from.

Apache POI 4.0.0 发布后,XLConnect 的维护者将能够升级他们的依赖项.届时您将不得不升级您项目中的XLConnect 版本,该警告将不再出现.

After Apache POI 4.0.0 has been released, maintainers of XLConnect will be able to upgrade their dependencies. At that time you will have to upgrade the version of XLConnect in your project and the warning will never appear again.

或者,如果您不依赖最新版本来满足任何其他需求,您可以将已安装的 Java 运行时环境降级到 JRE 1.8.161.

Alternatively, you could downgrade the installed Java runtime environment to JRE 1.8.161 if you are not depending on the most recent version for any other needs.

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

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