哪个版本的httpclient与Amazon SDK v 1.11.5兼容? [英] What version of httpclient is compatible with the Amazon SDK v 1.11.5?

查看:131
本文介绍了哪个版本的httpclient与Amazon SDK v 1.11.5兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I’m using the Amazon Java SDK, version 1.11.5 (I included the aws-java-sdk-1.11.5.jar in my WEB-INF/lib directory). What version of the Apache httpclient library do I need to include that is compatible with this version of the AWS SDK? I tried httpclient-4.3.4.jar, but I get the below error

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)

感谢您的帮助-戴夫(Dave)

Thanks for additional help, - Dave

推荐答案

在标签1.11.5下,

Looking at the source for the Java AWS SDK, under tag 1.11.5, you can see the in the POM file they have specified the following:

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

所以我想说HTTP客户端版本4.5.2与AWS开发工具包SDK 1.11.5兼容.如果您使用的是Maven之类的依赖项管理工具,则始终可以让它拉入指定了AWS开发工具包的HTTP Client版本.

So I'd say HTTP Client version 4.5.2 is compatible with the AWS SDK version 1.11.5. If you are using a dependency management tool like Maven you could always just let it pull in the version of HTTP Client specified the the AWS SDK.

这篇关于哪个版本的httpclient与Amazon SDK v 1.11.5兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆