Closed anasokan closed 1 year ago
Jetty 9.x is now at End of Community Support
See:
If this happens in Jetty 10 or Jetty 11 or Jetty 12 with a known Jakarta Mail implementation (not just an API/Spec jar), comment in this issue, and we'll be happy to reopen.
Between Java 8 and Java 11 some classes that were present in the JDK were removed.
You are apparently hitting such a case, so you should double-check all your dependencies, figure out exactly what class cannot be loaded, and verify where that class was in Java 8 and where it is supposed to be in Java 11.
I am using jetty 9.4.43.v20210629 and java 11.0.17. I am having a java code to send email which creates MimeMessage(javax.mail.internet.MimeMessage) class with new MimeMessage(session). This is not working. I get NoClassDefFoundError exception when new MimeMessage() is called.
When using jetty 9.4.43.v20210629 and java 1.8.0 it works. When using a standalond java application with -cp pointing to jetty WEB-INF/lib/ and this also works.
I am using javax.mail-1.6.2.jar. Also activation-1.1.jar and javax.activation-api-1.2.0.jar were present in the lib folder.
I made a grep of javax.mail in lib folder and see only its present in javax.mail-1.6.2.jar
Any reason or solution to this ?