Replies: 3 comments 6 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.
-
I encountered this same error when using the latest version of the JDBC connector to communicate with Athena via python Glue. Using v3.50 of the connector: https://docs.aws.amazon.com/athena/latest/ug/jdbc-v3-driver.html as an included jar in my glue job with glue version 5. I had the exact same namespace clash and resolved this by shading the namespace software.amazon.awssdk for com.example.athena.shaded.software.amazon.awssdk. The .jar was distributed with its dependencies, and this was one of them, shading replaces all references of this namespace with the new alias that we specify. Thus, allowing all existing bundled up code that used anything in software.amazon.awssdk to still use it. Crucially though, when glue v5 includes anything else in the classpath with the same namespaces/methods as this, there are no clashes any more which was causing the issue in the first place. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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