We've upgraded our application to Spring6/Tomcat10 (that implies migration from Java EE to Jakarta) and could not find jakarta compatible alternative for apache commons-email library?!
We seem to have decent amount of custom code that uses commons-email. Have anyone else run into this issue before? What our options are?
After performing the initial research I can think of the following options (and to be honest I don't like neither one of them :-():
java.lang.ClassCastException: class com.sun.mail.handlers.multipart_mixed cannot be cast to class jakarta.activation.DataContentHandler (com.sun.mail.handlers.multipart_mixed and jakarta.activation.DataContentHandler are in unnamed module of loader 'app')
Is there anything else we can do? Any help with be greatly appreciated!
commons-email 2.0.0 which will be compatible with the jakarta namespace will be available soon (I'm writing this answer on 2024-01-15) as you can see in this Jira ticket : https://issues.apache.org/jira/browse/EMAIL-203
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With