Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8114835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:16:31+00:00 2026-06-06T03:16:31+00:00

I am tring to send mail by AWSCredentials but getting an exception java.lang.NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory

  • 0

I am tring to send mail by AWSCredentials but getting an exception

java.lang.NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory

I have added these jar:

  • aws-java-sdk-1.3.11.jar
  • aws-java-sdk-1.3.11-javadoc.jar
  • aws-java-sdk-1.3.11-sources.jar
  • aws-java-sdk-flow-build-tools-1.3.11.jar
  • commons-logging.jar
  • httpclient-4.0-alpha4.jar
  • httpcore-4.0-alpha6.jar
  • log4j-1.2.13.jar
  • mail.jar

My java code is –

 import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient;
import com.amazonaws.services.simpleemail.model.*;
import java.util.LinkedList;

public class SESExample {
public static final String ACCESS_KEY = "My Access";
public static final String SECRET_KEY = "My Secret";

public static void main(String args[]) {
    String sender = "support@brandzter.com"; // should be verified email

    LinkedList<String> recipients = new LinkedList<String>();
    recipients.add("khoyendra@globussoft.com"); // again a verified email, if you are in sandbox

    SendMail(sender, recipients, "Hi", "Hi how are u?");
}

public static void SendMail(String sender, LinkedList<String> recipients, String subject, String body) {
    Destination destination = new Destination(recipients);

    Content subjectContent = new Content(subject);
    Content bodyContent = new Content(body);
    Body msgBody = new Body(bodyContent);
    Message msg = new Message(subjectContent, msgBody);

    SendEmailRequest request = new SendEmailRequest(sender, destination, msg);

    AWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY);
    AmazonSimpleEmailServiceClient sesClient = new AmazonSimpleEmailServiceClient(credentials);
    SendEmailResult result = sesClient.sendEmail(request);

    System.out.println(result);
}

}

I am also trying to search this jar but not getting.
Am I using wrong jar not sure.
can any one tell me what is the problem?

I am

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:16:33+00:00Added an answer on June 6, 2026 at 3:16 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to send a mail from a asp.net script, but im getting this
I've been getting the following exception when trying to send an e-mail using System.Net.Mail:
I am trying to send mail that is formated as HTML but I get
I'm trying to send a mail with PHPmailer and gmail. But when I send
I am using fedora in my DEV machine and tring to send mail via
I am trying to send mail using PHP but it doesn't seem to be
I am trying to send a mail with gwt and java on the server
I'm trying to send an e-mail from a module I'm writing, but I keep
I am trying to send mail using java mail api. My smtp server is
I am trying to send an HTML mail through PHP, but I can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.