Skip to content

[Java] java.lang.reflect.InaccessibleObjectException on Java 18 #340

@asfimport

Description

@asfimport

Getting the following stack trace when running on Java 18.

BaseAllocator throws this when it calls the DefaultAllocationManagerFactory.

    private ArrowBuf createEmpty() {
        return this.allocationManagerFactory.empty();
    }
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
 

Reporter: Daniel Glöckner

Related issues:

Note: This issue was originally created as ARROW-16449. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions