[ https://issues.apache.org/jira/browse/ARROW-16129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17518232#comment-17518232 ]
helmi commented on ARROW-16129: ------------------------------- Thanks [~lidavidm] > [Java] Illegal reflective access operation on JDK 11 > ---------------------------------------------------- > > Key: ARROW-16129 > URL: https://issues.apache.org/jira/browse/ARROW-16129 > Project: Apache Arrow > Issue Type: Sub-task > Components: Java > Affects Versions: 7.0.0 > Environment: Distributor ID: Ubuntu > Description: Ubuntu 20.04.4 LTS > Release: 20.04 > Codename: focal > Reporter: helmi > Priority: Blocker > > I'm parsing an arrow stream using the apache arrow java library 7.0.0 and I'm > seeing this warning: > {code:java} > WARNING: An illegal reflective access operation has occurred > WARNING: Illegal reflective access by org.apache.arrow.memory.util.MemoryUtil > (file:/home/ubuntu/.m2/repository/org/apache/arrow/arrow-memory-core/7.0.0/arrow-memory-core-7.0.0.jar) > to field java.nio.Buffer.address > WARNING: Please consider reporting this to the maintainers of > org.apache.arrow.memory.util.MemoryUtil > 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 > {code} > I'm running java from openjdk 11 > {code:java} > java --version > openjdk 11.0.12 2021-07-20 > OpenJDK Runtime Environment (build 11.0.12+0-adhoc..source) > OpenJDK 64-Bit Server VM (build 11.0.12+0-adhoc..source, mixed mode) > {code} > When moving to openjdk 17 I'm no longer able to run my code and I'm seeing > this error > {code:java} > 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 @315ea6a7 > at java.lang.reflect.AccessibleObject.checkCanSetAccessible > (AccessibleObject.java:354) > at java.lang.reflect.AccessibleObject.checkCanSetAccessible > (AccessibleObject.java:297) > at java.lang.reflect.Field.checkCanSetAccessible (Field.java:178) > at java.lang.reflect.Field.setAccessible (Field.java:172) > at org.apache.arrow.memory.util.MemoryUtil.<clinit> (MemoryUtil.java:84) > at org.apache.arrow.memory.ArrowBuf.getDirectBuffer (ArrowBuf.java:228) > at org.apache.arrow.memory.ArrowBuf.nioBuffer (ArrowBuf.java:223) > at org.apache.arrow.vector.ipc.ReadChannel.readFully (ReadChannel.java:87) > at org.apache.arrow.vector.ipc.message.MessageSerializer.readMessageBody > (MessageSerializer.java:727) > at org.apache.arrow.vector.ipc.message.MessageChannelReader.readNext > (MessageChannelReader.java:67) > at org.apache.arrow.vector.ipc.ArrowStreamReader.loadNextBatch > (ArrowStreamReader.java:145) > ... {code} > -- This message was sent by Atlassian Jira (v8.20.1#820001)