哪个版本的 httpclient 与 Amazon SDK v 1.11.5 兼容?
What version of httpclient is compatible with the Amazon SDK v 1.11.5?
我正在使用 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 客户端版本。
在maven repo for aws-java-sdk-core
查看编译依赖
您可以看到它依赖于 org.apache.httpcomponents » httpclient -- 4.5.2。进一步检查您是否拥有所有 dependencies of httpclient-4.5.2。您可能缺少 httpcore
的正确版本
我正在使用 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 客户端版本。
在maven repo for aws-java-sdk-core
查看编译依赖您可以看到它依赖于 org.apache.httpcomponents » httpclient -- 4.5.2。进一步检查您是否拥有所有 dependencies of httpclient-4.5.2。您可能缺少 httpcore