[
https://issues.apache.org/jira/browse/ARROW-16449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534429#comment-17534429
]
David Dali Susanibar Arce commented on ARROW-16449:
---------------------------------------------------
Hi [[email protected]] as per the jar artifacts are exposed as
a legacy mode (it means any jar are running in the classpath is consider as a
unnamed module) and base on JEP 200 The Modular JDK: yes, this is needed:
--add-opens ${module}/${package}=${target_modules}
Let the ${target_modules} access all types and members, regardless of
visibility, from ${module}'s ${package}
Also this is added to the Arrow Java documentation 8.0.0 at
[https://arrow.apache.org/docs/java/install.html]
---
This is a draft for implement JEP 200 The Modular JDK and be more restrict
about to not give ALL-UNNAMED access but there is a lot of discussion we need
to close before to convert this draft into PR:
[https://github.com/apache/arrow/pull/13072]
> [Java] java.lang.reflect.InaccessibleObjectException on Java 18
> ---------------------------------------------------------------
>
> Key: ARROW-16449
> URL: https://issues.apache.org/jira/browse/ARROW-16449
> Project: Apache Arrow
> Issue Type: Bug
> Components: Java
> Affects Versions: 6.0.0
> Reporter: Daniel Glöckner
> Priority: Major
>
> Getting the following stack trace when running on Java 18.
> {{BaseAllocator}} throws this when it calls the
> {{DefaultAllocationManagerFactory}}.
> {code}
> private ArrowBuf createEmpty() {
> return this.allocationManagerFactory.empty();
> }
> {code}
> {code:java}
> Caused by: java.lang.RuntimeException: Failed to initialize MemoryUtil.
> at org.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:136)
> ... 20 more
> Caused by: 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 @3453e479
> at
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
> at
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> at
> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
> at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
> at org.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:84)
> ... 20 more
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)