-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaMail implementation provided by Jetty makes JavaMail unusable on Java 11 due to missing JAF #2960
Comments
Are you using the following dependency in your war? <dependency>
<groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId>
<version>1.2.0</version>
</dependency> |
I guess that dependency could be in your |
@izstas have a look at issues #1600 and #1597. The best thing for you to do is to create your own mail module following the instructions in #1600. That way you can place whatever version of javax jars and its transitive dependencies onto the container classpath, and it will be portable across jetty versions. Note that in jetty-10 we've removed the mail and transaction modules anyway, so your custom mail module will be needed anyway. |
Closing this issue, please reopen if you feel we haven't addressed your concerns. |
Hello @janbartel (long time no talk ;)). Thanks for the explanations about this issue, which we're hitting on XWiki in our automated functional tests. We're using the official jetty image from dockerhub. Do you see a way to disable the mail module from the docker run command line (without having to create our own custom image)? Thanks a lot. I've checked https://www.eclipse.org/jetty/documentation/9.4.x/startup-modules.html but all I see is editing some init file or removing it which is more complex since it would require a custom Dockerfile and a new image. Thanks a lot |
@vmassol see appropriate/docker-jetty#108 - a fix to the official docker images should be done there. |
I am running Jetty 9.4.12.v20180830 on OpenJDK 11 (build 11+28), and I am unable to use JavaMail with
java.lang.ClassNotFoundException: javax.activation.DataSource
.I have a webapp packaged as a .war which uses JavaMail, and this is the situation I find myself in:
mail
module enabled as a transitive dependency of another module, and in accordance with System Classes classloading rules, JavaMail implementation provided by Jetty is loaded instead of the implementation on webapp's classpath.There are several workarounds for this issue:
javax.mail
The text was updated successfully, but these errors were encountered: