-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Hibernate tries to reflectively access metamodel classes not registered for reflection #45503
Comments
In some cases (when using the static metamodel -- see #44278) the class will exist, and in this case I agree it should be registered for reflection. But when the class doesn't exist, this call likely will just ignore the class, so the call was probably harmless until now. With your changes, can/should the (non-existing) classes be registered for reflection? |
To clarify: in the integration test you mentioned, the metamodel classes ( |
Yes, any attempt to access something reflectively (even when it doesn't exist) results in a |
Seems like this could spell trouble for some libraries, but I understand. In our case it should be fine, because...
Great! In this case, the todo for this issue is to change Here would be a good place for this change: Line 104 in 1055c6e
I'd do it now, but I'm in the middle of something, and switching branches on the Quarkus repo makes Intellij freeze for 10+ minutes, so it'll wait a bit. |
Describe the bug
Hibernate seems to be reflectively accessing some metamodel classes that we don't register for reflection in native-mode.
The classes are accessed in https://github.com/hibernate/hibernate-orm/blob/9d52e3c9dfc49a9be804220c2382055d5901daa9/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java#L728-L731
Relates to #41995
Expected behavior
All reflective accesses should be registered.
Actual behavior
Reflective accesses are not registered resulting in warnings like the following when using
-H:ThrowMissingRegistrationErrors=
:How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
21.0.5
Mandrel or GraalVM version (if different from Java)
Mandrel-24.1.1.0-Final
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: