-
Notifications
You must be signed in to change notification settings - Fork 184
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
EnvironmentVaultConfiguration
causes ClassNotFoundException
if AWS SDK is not on the class path
#786
Comments
This sounds like a bug. Can you attach the full stack trace so we get the detail where the exception is being thrown? |
Please find attached the stacktrace (packages / source file names partially redacted):
|
This exception shows a failure originating from your class |
Here is a small sample project: |
Thanks a lot, this makes things much easier. |
Interestingly, the method body containing the AWS IAM code causes the failure. Moving the code into another class fixes the problem. |
EnvironmentVaultConfiguration
causes ClassNotFoundException
if AWS SDK is not on the class path
Having the AWS IAM authentication code inside the method body creating AwsIamAuthentication causes class loading of the AwsCredentialsProvider class although the return type is ClientAuthentication. With the code moved to an inner class, we mitigate that issue without actually knowing why the JVM attempts to load AwsIamAuthentication even the method isn't used. Closes gh-786
That's fixed now. Care to test against the latest |
I can confirm it works with 3.0.3-SNAPSHOT. |
After upgrading spring-vault-core from 3.0.1 to 3.0.2 my application no longer starts. It fails with
java.lang.ClassNotFoundException: software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
. Is the dependency tocom.amazonaws:aws-java-sdk-core
mandatory even if not using AWS-IAM authentication?The text was updated successfully, but these errors were encountered: