Replies: 2 comments 4 replies
-
That's because the Instead of using the bundled jar, we recommend to add as a dependency only the services you are going to use in you project. For more info see - https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-project-maven.html#configuring-maven |
Beta Was this translation helpful? Give feedback.
-
@umesh2611 I'm going to move this to the Discussions tab, since it's a usage question and not really a bug. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Describe the bug
Hi,
I am following the link : https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html to send a kafka message to the MSK cluster ( provisioned / IAM )
When i am sending the message i get the following error :
2023-01-10T14:05:04.035+05:30
Copy
2023-01-10 08:35:04,033 - ERROR - kafka-producer-network-thread | producer-1 - org.apache.kafka.common.utils.KafkaThread - Uncaught exception in thread 'kafka-producer-network-thread | producer-1':
2023-01-10T14:05:04.035+05:30 java.lang.NoSuchMethodError: 'void com.amazonaws.util.IOUtils.closeQuietly(java.io.Closeable, org.apache.commons.logging.Log)'
at software.amazon.msk.auth.iam.internals.UserAgentUtils.getLibraryVersion(UserAgentUtils.java:73)
at software.amazon.msk.auth.iam.internals.UserAgentUtils.getLibraryVersion(UserAgentUtils.java:73)
at software.amazon.msk.auth.iam.internals.UserAgentUtils.(UserAgentUtils.java:43)
at software.amazon.msk.auth.iam.internals.UserAgentUtils.(UserAgentUtils.java:43)
complete log :
https://eu-west-1.console.aws.amazon.com/cloudwatch/home?region=eu-west-1#logsV2:log-groups/log-group/$252Faws$252Fecs$252FTmf628NormalizationUPALIWAL/log-events/ecs$252Ftmf628NormalizationContainer2$252F798843bb106f4e5a8fe41e423673e0a5
What i analyzed, the IOUtils pacakged in com.amazonaws.aws-java-sdk-bundle-1.12.262.jar contains a method with the following signature :
public static void com.amazonaws.util.IOUtils.closeQuietly(java.io.Closeable,com.amazonaws.thirdparty.apache.logging.Log)
but "aws-msk-iam-auth" is expecting a method with the following signature :
'void com.amazonaws.util.IOUtils.closeQuietly(java.io.Closeable, org.apache.commons.logging.Log)'
on analysis, I found that there are 2 IOUtils class from core and bundle jar.
the signature on the core jar is crrect but the bundle contains public static void com.amazonaws.util.IOUtils.closeQuietly(java.io.Closeable,com.amazonaws.thirdparty.apache.logging.Log)
Can you pease help me on moving ahead ?
/Umesh Paliwal
Expected Behavior
NA
Current Behavior
NA
Reproduction Steps
NA
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.17.295
JDK version used
11
Operating System and version
linux
Beta Was this translation helpful? Give feedback.
All reactions