gpt4 book ai didi

httpclient - 哪个版本的 httpclient 与 Amazon SDK v 1.11.5 兼容?

转载 作者:行者123 更新时间:2023-12-04 00:51:47 24 4
gpt4 key购买 nike

我使用的是 Amazon Java SDK,版本 1.11.5(我在我的 WEB-INF/lib 目录中包含了 aws-java-sdk-1.11.5.jar)。我需要包含与此版本的 AWS 开发工具包兼容的 Apache httpclient 库的哪个版本?我尝试了 httpclient-4.3.4.jar,但出现以下错误

15:34:25,366 ERROR [io.undertow.request] (default task-34) UT005023: Exception handling request to /pluginwiris_engine/app/service: java.lang.NoSuchMethodError:    org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.<init>(SdkTLSSocketFactory.java:56)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:87)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:46)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:37)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:213)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:145)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:393)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:373)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:355)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:327)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:309)

感谢您的额外帮助,-戴夫

最佳答案

查看 Java AWS SDK 的源代码,在标签 1.11.5 下,you can see the in the POM file他们规定了以下内容:

<httpcomponents.httpclient.version>4.5.2</httpcomponents.httpclient.version>

所以我会说 HTTP 客户端版本 4.5.2 与 AWS SDK 版本 1.11.5 兼容。如果您正在使用像 Maven 这样的依赖管理工具,您总是可以让它拉入指定 AWS SDK 的 HTTP 客户端版本。

working combination of libraries

关于httpclient - 哪个版本的 httpclient 与 Amazon SDK v 1.11.5 兼容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37689319/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com