-
Notifications
You must be signed in to change notification settings - Fork 354
Add actuator support #9
Comments
Many errors are very confusing. And currently if you stray much beyond the existing usage demonstrated in samples, it will start failing (it is still pre 1.0). That said, if you ever get a 'class not found' type message you can quickly try to fix that yourself by creating your own reflect-config.json file in the project META-INF/native-image folder, per the instructions in https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md. However, in this case the feature is trying to tell you something early so we don't get a very cryptic error later. The features encapsulates hints on various types that suggest "oh if this type is being used, we need to make sure graal can reflect on these other types". At the moment each selector needs specific handling that specifics what types it might select. We'll need to add handling for |
This error happens when you add actuator support, so I turn it into a more general one. |
Similar error happened in
So this issue is not specific to |
There are now actuator samples in the repository so the feature does support basic usage of actuator - please try it out and let me know how it goes.
The problem is difficult to solve in the general sense because import selectors can do anything they want in code to compute the result of calling them at runtime. It isn't reasonable to analyze the code to work it out, so we need a hint. The messages coming out now are warning there is no hint and failing early rather than more cryptically later. The docs discuss how to create a hint when you get the problem (and perhaps contribute it back): Supporting actuator was writing a complicated hint. But as I was there I also dropped one in for the Please reopen if actuator not behaving for you, I am pretty sure our two samples do not cover it exhaustively. |
I'm seeing the error below when trying to use the command line runner example.
No @CompilationHint found for import selector: org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextConfigurationImportSelector
What is the best way to determine the root cause of an error during native-image?
The text was updated successfully, but these errors were encountered: