AWS ElasticBean — Migrating Platform from Tomcat 8.5 to Tomcat 10
You probably have seen your AWS ElasticBean Environment Platform in a “deprecated” state for quite a while, something like this
The application was written in Java, and deployed using Tomcat.
In my case, the Amazon SES STMP email was working before Jan 19, 2024. But somehow it is not working after that, my website was getting error in your log file as follows.
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Eh!
I did lots of research, and the following steps worked for me.
First, I downloaded and installed Tomcat 10 in my local for testing.
Secondly, I replaced javax.servlet-3.0.0.jar and javax.mail-1.6.2.jar with
jakarta.mail-1.6.3.jar
jakarta.servlet-api-6.0.0.jar
Thirdly, I make sure in the code, I replace all the import with
Get Alexandra Z Harner’s stories in your inbox
Join Medium for free to get updates from this writer.
Replace the javax.servlet.* imports in your code by jakarta.servlet.* ones.
import jakarta.servlet.*;
import jakarta.servlet.http.*;For the above, I learend from https://stackoverflow.com/questions/64387472/servlet-5-0-jar-throws-compile-error-on-javax-servlet-but-servlet-4-0-jar-does
Fourthly, I make sure the ssl protocols is explicitly stated in the program.
Properties props = System.getProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.port", Integer.valueOf(587));
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.smtp.ssl.protocols", "TLSv1.2");
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
Session session = Session.getDefaultInstance(props);
MimeMessage msg = new MimeMessage(session);For the above, I learned from
I learned from the stackoverflow.com (see snapshot below)
Fifth, creating a new AWS ElasticBean using Tomcat 10 as platform.
Using the above five steps, the AWS ElasticBean application is receiving email again! Hope it helps!










