Open montesmoci opened 1 year ago
did you add the necessary library https://micronaut-projects.github.io/micronaut-gcp/latest/guide/#nativeImage
Not initially, no. I've added the dependency and the error still persists.
Perhaps I'm using an incompatible Java GraalVM?
FYI: Adding implementation("com.google.cloud:google-cloud-secretmanager:2.12.0")
resolves the issue.
Expected Behavior
Successful retrieval and reading of a secret stored in Secret Manager.
Actual Behaviour
The following stack trace is generated when attempting to retrieve a secret:
Steps To Reproduce
secret_txt
(see line 16 of bug/nativeCompile/googleSecretManager/ApplicationSecretsClient.java).gcp.project-id
in application.yml to the relevant value.sdk use java 22.2.r17-grl
./gradlew nativeCompile
../build/native/nativeCompile/bug-nativeCompile-googleSecretManager
io.grpc.auth.GoogleAuthLibraryCallCredentials createJwtHelperOrNull WARNING: Failed to create JWT helper. This is unexpected java.lang.NoSuchMethodException: com.google.auth.oauth2.ServiceAccountCredentials.getQuotaProjectId()
error is generated. The above error is not generated whenever./gradlew run
is executed.Environment Information
Example Application
https://github.com/montesmoci/bug-nativeCompile-googleSecretsManager
Version
3.8.6