-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Java] java.lang.reflect.InaccessibleObjectException on Java 18 #340
Comments
David Li / @lidavidm: |
Raúl Cumplido / @raulcd: Thanks for your report. We are working towards supporting newer JDK versions. Support for JDK 17 will be added to the next 8.0.0 release as you can see from this ticket https://issues.apache.org/jira/browse/ARROW-15755 . Support for JDK 18 is expected to be added to a following release. You can follow how support for JDK 18 progresses on this ticket: https://issues.apache.org/jira/browse/ARROW-16267 |
Daniel Glöckner: |
Daniel Glöckner: The minimal code below only works if I add import org.apache.arrow.memory.RootAllocator;
public class Arrow {
public static void main(String[] args) {
RootAllocator rootAllocator = new RootAllocator();
var buf = rootAllocator.buffer(1024);
System.out.println(buf);
}
} |
David Li / @lidavidm: |
David Dali Susanibar Arce / @davisusanibar: --add-opens ${module}/${package}=${target_modules} 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: apache/arrow#13072
|
David Dali Susanibar Arce / @davisusanibar: |
Fabian Mastenbroek: I stumbled upon this issue today and ideally I would like to avoid having to open The reflective call that is currently causing the failure is not necessary. Applying this patch to the Arrow tree seems to resolve this issue for me. However, without the suggested add-opens parameter, any call to MemoryUtil.directBuffer will now fail during runtime. This patch resolves that issue for me. However, this is a rather hairy solution, since it overwrites fields of DirectByteBuffer using Unsafe to construct a buffer for an arbitrary memory address. |
David Li / @lidavidm: |
We can't solve this without rewriting the memory subsystem (unfortunately). FFM is a better potential solution. |
Getting the following stack trace when running on Java 18.
BaseAllocator
throws this when it calls theDefaultAllocationManagerFactory
.Reporter: Daniel Glöckner
Related issues:
Note: This issue was originally created as ARROW-16449. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: