


















Java 高版本(Java 9+)与 Apache Ignite 旧版本不兼容 导致的模块访问权限报错。
核心报错信息:
plaintext
java.lang.reflect.InaccessibleObjectException:
Unable to make field long java.nio.Buffer.address accessible:
module java.base does not "opens java.nio" to unnamed module
翻译:
Java 9+ 开启了模块化安全限制,不允许 Ignite 直接访问底层内存地址,导致 Ignite 启动失败。
给 Java 启动加一行 JVM 参数,开放权限即可。
plaintext
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
plaintext
java
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
-jar your-app.jar
Run/Debug Configurations → VM options
粘贴:
plaintext
--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。