You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading AWS SDK from 2.20.83 to 2.22.0 my application is failing, because CloudWatchAsyncClient bean cannot be created because of the following error:
Caused by: java.lang.ClassNotFoundException: software.amazon.awssdk.protocols.query.interceptor.QueryParametersToBodyInterceptor
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
Expected Behavior
CloudWatchAsyncClient should not be failing
Current Behavior
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [software.amazon.awssdk.services.cloudwatch.CloudWatchAsyncClient]: Factory method 'cloudWatchAsyncClient' threw exception with message: software/amazon/awssdk/protocols/query/interceptor/QueryParametersToBodyInterceptor
at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178)
at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
... 123 more
Caused by: java.lang.NoClassDefFoundError: software/amazon/awssdk/protocols/query/interceptor/QueryParametersToBodyInterceptor
at software.amazon.awssdk.services.cloudwatch.DefaultCloudWatchBaseClientBuilder.finalizeServiceConfiguration(DefaultCloudWatchBaseClientBuilder.java:74)
at software.amazon.awssdk.awscore.client.builder.AwsDefaultClientBuilder.finalizeChildConfiguration(AwsDefaultClientBuilder.java:160)
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.asyncClientConfiguration(SdkDefaultClientBuilder.java:219)
at software.amazon.awssdk.services.cloudwatch.DefaultCloudWatchAsyncClientBuilder.buildClient(DefaultCloudWatchAsyncClientBuilder.java:39)
at software.amazon.awssdk.services.cloudwatch.DefaultCloudWatchAsyncClientBuilder.buildClient(DefaultCloudWatchAsyncClientBuilder.java:26)
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.build(SdkDefaultClientBuilder.java:155)
at com.myapp.configuration.CloudWatchConfiguration.cloudWatchAsyncClient(CloudWatchConfiguration.java:35)
at com.myapp.configuration.CloudWatchConfiguration$$SpringCGLIB$$0.CGLIB$cloudWatchAsyncClient$0(<generated>)
at com.myapp.configuration.CloudWatchConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at com.myapp.configuration.CloudWatchConfiguration$$SpringCGLIB$$0.cloudWatchAsyncClient(<generated>)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
... 124 more
Caused by: java.lang.ClassNotFoundException: software.amazon.awssdk.protocols.query.interceptor.QueryParametersToBodyInterceptor
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 139 more
Reproduction Steps
In my project I'm using Spring Boot 3.2, Java 21 and following aws libs
implementation("software.amazon.awssdk:sts:2.22.0")
implementation("software.amazon.awssdk:netty-nio-client:2.22.0")
software/amazon/awssdk/services/cloudwatch/DefaultCloudWatchBaseClientBuilder.java
should not use non existing class software.amazon.awssdk.protocols.query.interceptor.QueryParametersToBodyInterceptor
Additional Information/Context
No response
AWS Java SDK version used
2.22.0
JDK version used
openjdk 21.0.1 2023-10-17 LTS
Operating System and version
MacOS 14.1.2
The text was updated successfully, but these errors were encountered:
@pawelryznar this is likely caused by mismatched versions of SDK modules in your classpath. Make sure all modules are in the exact same version. You can check the versions of your dependency tree by running $ gradle -q dependencies
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
After upgrading AWS SDK from 2.20.83 to 2.22.0 my application is failing, because CloudWatchAsyncClient bean cannot be created because of the following error:
Expected Behavior
CloudWatchAsyncClient should not be failing
Current Behavior
Reproduction Steps
In my project I'm using Spring Boot 3.2, Java 21 and following aws libs
implementation("software.amazon.awssdk:sts:2.22.0")
implementation("software.amazon.awssdk:netty-nio-client:2.22.0")
Following code is failing
Possible Solution
software/amazon/awssdk/services/cloudwatch/DefaultCloudWatchBaseClientBuilder.java
should not use non existing class software.amazon.awssdk.protocols.query.interceptor.QueryParametersToBodyInterceptor
Additional Information/Context
No response
AWS Java SDK version used
2.22.0
JDK version used
openjdk 21.0.1 2023-10-17 LTS
Operating System and version
MacOS 14.1.2
The text was updated successfully, but these errors were encountered: