Skip to content

java.lang.NoSuchMethodError: 'void com.amazonaws.util.IOUtils.closeQuietly #3684

@umesh2611

Description

@umesh2611

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions