title: AWS SDK: java.lang.NoSuchMethodError
body: <p>Whenever I try to send mail via AWS SDK, I get the following exception: <br></p>
  
  <pre><code>java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)V
  </code></pre>
  
  <p>I got a hint here ( <a href="https://github.com/aws/aws-sdk-java/issues/422" rel="nofollow">https://github.com/aws/aws-sdk-java/issues/422</a> ) what may be wrong: Apparently there are some conflicts between versions of HttpClient and HttpCore but I can't figure it out no matter which version I try. <br></p>
  
  <p>part of <strong>.classpath</strong> file: <br></p>
  
  <pre><code>&lt;classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69-javadoc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69-sources.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/aws-java-sdk-flow-build-tools-1.10.69.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/httpclient-4.3.6.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/httpcore-4.3.3.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/google-http-client-1.18.0-rc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/google-http-client-appengine-1.18.0-rc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/google-http-client-gson-1.18.0-rc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/google-http-client-jackson2-1.18.0-rc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/google-http-client-jdo-1.18.0-rc.jar"/&gt;
  &lt;classpathentry kind="lib" path="lib/httpmime-4.1.3.jar"/
  </code></pre>
  
  <p>complete exception printStack(): <br></p>
  
  <pre><code>java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)V
  at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:96) ~[aws-java-sdk-1.10.69.jar:?]
  at com.amazonaws.http.AmazonHttpClient.&lt;init&gt;(AmazonHttpClient.java:187) ~[aws-java-sdk-1.10.69.jar:?]
  at com.amazonaws.AmazonWebServiceClient.&lt;init&gt;(AmazonWebServiceClient.java:136) ~[aws-java-sdk-1.10.69.jar:?]
  at com.amazonaws.AmazonWebServiceClient.&lt;init&gt;(AmazonWebServiceClient.java:120) ~[aws-java-sdk-1.10.69.jar:?]
  at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.&lt;init&gt;(AmazonSimpleEmailServiceClient.java:165) ~[aws-java-sdk-1.10.69.jar:?]
  at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.&lt;init&gt;(AmazonSimpleEmailServiceClient.java:145) ~[aws-java-sdk-1.10.69.jar:?]
  at com.fieldoo.service.MailService.send(MailService.java:259) ~[classes/:?]
  at com.fieldoo.service.MailService.checkAndSendQueue(MailService.java:222) ~[classes/:?]
  at com.fieldoo.service.MailService$$FastClassByCGLIB$$ce530a4.invoke(&lt;generated&gt;) ~[cglib-nodep-2.2.jar:?]
  at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) ~[cglib-nodep-2.2.jar:?]
  at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) ~[org.springframework.transaction-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at com.fieldoo.service.MailService$$EnhancerByCGLIB$$382d8989.checkAndSendQueue(&lt;generated&gt;) ~[cglib-nodep-2.2.jar:?]
  at com.fieldoo.controller.ScheduleController.sendEmails(ScheduleController.java:196) ~[classes/:?]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_04]
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_04]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_04]
  at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_04]
  at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_04]
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [?:1.7.0_04]
  at java.util.concurrent.FutureTask.run(FutureTask.java:166) [?:1.7.0_04]
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_04]
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_04]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [?:1.7.0_04]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [?:1.7.0_04]
  at java.lang.Thread.run(Thread.java:722) [?:1.7.0_04]
  </code></pre>
  
  <p>this exception is caused with the following line of code:</p>
  
  <pre><code>AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(credentials);
  </code></pre>
  
  <p>where <code>credentials</code> is an instance of AWSCredentials. <br>
  If you need any additional information I will be glad to provide it.</p>