Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of httpclient is compatible with the Amazon SDK v 1.11.5?

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)

Thanks for additional help, - Dave

like image 671
Dave Avatar asked Jun 07 '16 21:06

Dave


People also ask

Does AWS SDK use HTTP or HTTPS?

Communication over HTTPS is the default, and is more secure than HTTP, which is why AWS recommends using HTTPS. HTTPS connections can use more system resources because of the extra work to encrypt network traffic, so the option to use HTTP is available in case users need it.

What is AWS SDK version?

The version 3. x of the AWS SDK for JavaScript is generally available. For more information see the Developer Guide or API Reference.

What is Apache Httpclient used for?

Http client is a transfer library. It resides on the client side, sends and receives Http messages. It provides up to date, feature-rich, and an efficient implementation which meets the recent Http standards.


1 Answers

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>

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.

working combination of libraries

like image 182
Mark B Avatar answered Sep 22 '22 02:09

Mark B