I am tring to send mail by AWSCredentials but getting an exception
java.lang.NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory
From the javadoc, it seems that the org/apache/http/conn/scheme/SchemeSocketFactory
class exists since the 4.1 version.
So, try to upgrade httpclient jar to at least 4.1 version.
In my case, I had two libraries that I created in Netbeans 7.2: one for the Apache Commons Codec 1.6, and one for the Apache Commons HttpClient 4.2.2. In this case, because the library I made for HttpClient also contained the Codec 1.6 jar, I was getting this same error.
Be sure you don't have two of the same libraries referenced in your class path, or two conflicting versions of the same library.
From the javadocs, the SchemeSocketFactory
class is only available since version 4.1. So this might have something to do with the fact that you are using the 4.0 alpha jars. Try upgrading your http-client library to 4.1 or higher.
debug your code and point out where Exception occur. Any of instance of class that you used is not included in your jar file i think so. am not sure. find that by debugging. i think SchemeSocketFactory is not exsisting in your class path. please check
If you download the latest aws java SDK (I just downloaded aws-java-sdk-1.9.3),
the required libraries will be in the third-party/**/lib folders. There are a bunch of them!
This answer from jomofrodo needs more atention. Nailed it. Thanks!