-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Avoid need for reflection hints for MBeanExporter
in native image
#30846
Comments
If we wish to continue using However, I think we should consider a different approach to |
MBeanExporter
should not require reflection in a native image
Since In light of that, I have changed the title of this issue. |
MBeanExporter
should not require reflection in a native imageMBeanExporter
in native image
Update
|
MBeanExporter
in native imageMBeanExporter
in native image
MBeanExporter
in native imageMBeanExporter
in native image
@beckermarc, the changes to If you can verify that the changes work for you with 6.0.11 snapshots, we'd be grateful! Otherwise, please give it a try once 6.0.11 has been released. Thanks |
Thanks @sbrannen! 🚀 |
Great! Thanks so much for confirming this, @beckermarc. 👍 |
When setting
spring.jmx.enabled
totrue
in a Spring Boot application and building a native image the native image fails with the following exception during startup:This is due to missing reflection configuration on fields of
MBeanExporter
, which is required by thenew Constants(MBeanExporter.class)
call here: https://github.com/spring-projects/spring-framework/blob/main/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java#L142After adding a
reflection-configuration.json
with the following content to the application the error no longer occurs:Is it reasonable to add this reflection configuration to Spring?
Steps to reproduce
spring.jmx.enabled: true
inapplication.properties
mvn native:compile -Pnative
The text was updated successfully, but these errors were encountered: