Sitemap
Alexandra Z Harner

Alexandra Z Harner

I am a hands-on software consultant who enjoys bringing smiles to people. My site https://www.createclassicsudoku.com ranks 1st when you google “make sudoku”

AWS ElasticBean — Migrating Platform from Tomcat 8.5 to Tomcat 10

2 min readFeb 9, 2024

You probably have seen your AWS ElasticBean Environment Platform in a “deprecated” state for quite a while, something like this

Press enter or click to view image in full size
Deprecated Platform State

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

Press enter or click to view image in full size

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)

Press enter or click to view image in full size

Fifth, creating a new AWS ElasticBean using Tomcat 10 as platform.

Press enter or click to view image in full size

Using the above five steps, the AWS ElasticBean application is receiving email again! Hope it helps!

--

--

Alexandra Z Harner
Alexandra Z Harner

Written by Alexandra Z Harner

I am a hands-on software consultant who enjoys bringing smiles to people. My site https://www.createclassicsudoku.com ranks 1st when you google “make sudoku”