我正在使用Amazon Java SDK版本1.11.5(我在我的WEB-INF/lib目錄中包含了aws-java-sdk-1.11.5.jar)。我需要包含哪個版本的Apache httpclient庫,以便與此版本的AWS SDK兼容?我試過的HttpClient-4.3.4.jar,但我得到下面的錯誤什麼版本的httpclient與Amazon SDK v 1.11.5兼容?
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)
感謝額外的幫助, - 戴夫
我試着添加這個jar,但我仍然得到相同的錯誤,是否只需要修復它? – moondaisy
同樣的錯誤在這裏使用sdk版本1.11.77 –
@moondaisy你可能會在你的類路徑中有另一個版本的httpclient。 –