从s3存储桶名称读取时使用Aws SQS扩展库时获取NoSuchMethodError

时间:2017-10-02 15:54:57

标签: java amazon-web-services amazon-sqs

使用aws扩展sqs客户端lib时获取以下错误消息。

java.lang.NoSuchMethodError:     com.amazonaws.util.IOUtils.closeQuietly(Ljava / IO /可关闭的; Lorg /阿帕奇/公地/记录/日志;)V             在com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.getTextFromS3(AmazonSQSExtendedClient.java:1192)             在com.amazon.sqs.javamessaging.AmazonSQSExtendedClient.receiveMessage(AmazonSQSExtendedClient.java:351)             在com.zebra.SQSCofigCredentials.getMessagesFromQueue(SQSCofigCredentials.java:143)             在com.zebra.WorkerSQSLoader.run(WorkerSQSLoader.java:46)             在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)             at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)             在java.lang.Thread.run(Thread.java:748)

以下是Pom.XML

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk</artifactId>
        <version>1.11.122</version>
    </dependency>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-sqs</artifactId>
        <version>1.11.138</version>
    </dependency>


    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>amazon-sqs-java-extended-client-lib</artifactId>
        <version>1.0.1</version>
    </dependency>

该程序使用来自SQS的消息并将消息发布到Kafka主题。

0 个答案:

没有答案