-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] Problem with compiling Spring Boot KeyVault starters into a native executable #43563
Comments
Sure, we will take a look |
Any news @Netyyyy? Do you need more data? |
Hi @piotrooo , sorry for the late reply, we are looking into this issue and could you help provide steps to reproduce? |
Sure @Netyyyy
|
Hi @piotrooo , this bug is fixed in #43316 and may publish in the next release. Here is a workaround to solve: and add the following contents:
|
I don't know if it's somehow related, but I receive the following error (at runtime):
Then I added: @RegisterReflectionForBinding({SecretBundle.class, SecretAttributes.class, DeletionRecoveryLevel.class}) Which leads to the following exception:
|
How to reproduce this error? I didn't encounter it through your repo |
Sure, I've just updated the repository. What I trying to do? I've registered a bean to get credentials. I would like to use @Bean
public AzureServiceClientBuilderCustomizer<SecretClientBuilder> secretClientBuilderCustomizer() {
return builder -> builder.credential(new DefaultAzureCredentialBuilder().build());
} Then I try to fetch a secret from Key Value. @Bean
public ApplicationListener<ApplicationStartedEvent> applicationInitializers(SecretClient secretClient) {
return event -> {
System.out.println("Azure Key Vault Native Application Started");
String password = secretClient.getSecret("some-secret").getValue();
System.out.println(password);
};
} |
Describe the bug
When I tried to compile a simple application into a native executable, I received the following exception:
Then, I tried to manually register the
AzureGlobalProperties
bean. After that, I encountered another exception:Next, I configure the build as described here, and the application was successfully compiled. However, when I started the application, I received the following exception at runtime:
Exception or Stack Trace
SecurityException1
SecurityException 2
Exception at runtime
To Reproduce
https://github.com/piotrooo/azure-key-vault-native
Code Snippet
https://github.com/piotrooo/azure-key-vault-native
Expected behavior
The program will be compiled into a native executable.
Screenshots
N/A
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: