After migrating application to Spring Boot 3 and Java 17 I tried to deploy it to Tomcat 10.1.x.
The deployment failed with exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailSender' defined in class path resource [org/springframework/boot/autoconfig ure/mail/MailSenderPropertiesConfiguration.class]: Failed to instantiate [org.springframework.mail.javamail.JavaMailSenderImpl]: Factory method 'mailSender' threw exception with message: arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, jakarta.activation.MimeTypeRegistry