-
Notifications
You must be signed in to change notification settings - Fork 43
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
Exception when size of using with Java 10 #54
Comments
We will probably need to revisit sizeof past Java 9. I think, we relying on reflection, sizeof will need to have JVM arguments. In this case you will need |
I don't think the sizeof engine would return correct sizes for a new major JDK without modifications. There also is another problem that the reflection-based sizeof engine really should never be picked up as it's much, much slower than the agent and unsafe ones. Maybe we should have a look at JOL (http://openjdk.java.net/projects/code-tools/jol/) as this does a very similar job, maybe we could join forces? |
Yes. It means that the agent has failed (which is expected starting with Java 9 but I think can be fixed) and Unsafe as failed (which I think is the case in Java 10). And yes joining forces with JOL sounds like a good idea. |
A few comments:
|
This is a backport of a fix developed in: Original Author: @mprusakov ehcache/sizeof#61 ehcache/sizeof#54 Also adds unit test for that issue.
Executing the basic load of size of in AdopyOpenJDK 10.0.1:
Returns this exception:
InaccessibleObjectException:
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.Object jdk.internal.loader.AbstractClassLoaderValue$Sub.key accessible: module java.base does not "opens jdk.internal.loader" to unnamed module
The text was updated successfully, but these errors were encountered: