Исключение при попытке внедрения AWS SDK
Я столкнулся с ошибкой при попытке реализовать AWS SDK в нашем веб-приложении Java. Я пытаюсь написать простой метод для сохранения изображения в корзину S3, и ошибка происходит, когда я запускаю этот метод.
Трассировка Стека
SEVERE: Servlet.service() for servlet dispatcher threw exception
java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)V
at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:95)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:198)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:129)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:434)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:416)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:400)
at com.artistbomb.common.CommonUtility.saveImage(CommonUtility.java:254)
Основываясь на том, что я видел в Google, у меня есть ощущение, что эта проблема связана с ошибкой в моей конфигурации пути сборки. Я включил все банки AWS, а также все сторонние банки, и я прошел через и удалены старые версии библиотек.
Classpath
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-acl-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-aspects-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-config-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-core-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-taglibs-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-security-web-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/anet-java-sdk-1.4.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aopalliance-1.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-3.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cglib-2.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-dbcp-all-1.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-digester-2.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-discovery-0.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-1.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-lang-2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.1.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-pool-1.5.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-validator-1.4.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ehcache-core-2.3.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ehcache-spring-annotations-1.2.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ezmorph-1.0.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-core-3.6.1.Final.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-entitymanager-3.6.1.Final.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-validator-4.1.0.Final.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpcore-4.3.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpclient-4.3.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpclient-cache-4.3.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpmime-4.3.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-all-1.9.5.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-annotations-2.5.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-core-2.5.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-databind-2.5.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javassist-3.12.0.GA.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.mail-api-1.4.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-1.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jta-1.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.12.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mail-1.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mysql-connector-java-5.1.18.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/quartz-1.8.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/restfb-1.6.9.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/scribe-1.3.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.6.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.6.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-aop-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-asm-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-beans-3.0.7.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-3.0.7.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-support-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-core-3.0.7.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-expression-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-jdbc-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-mock-2.0.8.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-orm-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-tx-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-web-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-webmvc-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/validation-api-1.0.0.GA.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xerces-2.6.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/yuicompressor-2.4.7.jar"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjrt.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjweaver.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/joda-time-2.8.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/freemarker-2.3.18.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ecwid-mailchimp.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/fluent-hc-4.3.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/gson-2.2.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/guava-17.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/java-lutung-mandrill.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aws-java-sdk-1.10.5.1-javadoc.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aws-java-sdk-1.10.5.1-sources.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aws-java-sdk-flow-build-tools-1.10.5.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aws-java-sdk-1.10.5.1.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>