I was using version 1.10.0 but I had to upgrade in order to have this:
s3client.setS3ClientOptions(S3ClientOptions.builder().setAccelerateModeEnabled(true).build());
Now I'm using version 1.11.62 but I get this error:
javax.servlet.ServletException: 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:91)
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:51)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:39)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:302)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:164)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:564)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:544)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:526)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:498)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:480)
Do you have a different version of Apache Commons HTTP Client on your classpath? The SDK requires 4.5.2 as a minimum.
@kiiadi Yes, I had 4.3.6 but I have upgraded that too and keep getting the same error.
That's odd, maybe it's loading the Apache classes from a different jar. Can you try running the following and pasting the output? It may give us a clue where it's trying to get those classes from:
org.apache.http.conn.ssl.SSLConnectionSocketFactory.class.getProtectionDomain().getCodeSource().getLocation().getPath()
@kiiadi Thanks, adding that I realized that the old version of httpClient was still on the Tomcat folder.
I'll close this issue.
Most helpful comment
Do you have a different version of Apache Commons HTTP Client on your classpath? The SDK requires 4.5.2 as a minimum.