Comments (11)
@janbartel what did we do to fix this?
from docker-jetty.
@gregw in jetty-9.4 we have the mail.mod module, which puts javax.mail.glassfish-1.4.1.v201005082020.jar onto the container classpath. That jar contains both the javax.mail apis and the impl. This is tested and working in jdk-11 and beyond.
For jetty-10.0 we have removed the mail.mod module altogether. If users wish to use a javax.mail service the they need to provide their own jar/s, preferably by making their own mail mod file.
See also jetty issue eclipse/jetty.project#2960.
from docker-jetty.
Any chances of having some Jetty 10 preview images? I really don't have a workaround without a baseline Docker image that supports Java 11 and doesn't break email.
from docker-jetty.
Workaround for now:
FROM jetty:9.4-jre11
...
# workaround for https://github.com/appropriate/docker-jetty/issues/108
USER root
RUN rm -rf /usr/local/jetty/lib/mail
USER jetty
from docker-jetty.
@brunojcm we should be doing an jetty-10-alpha1 release next week, so I'll try to get a docker image going as well.... feel free to hassle me if I forget!
from docker-jetty.
@gregw, thanks for the update! Let me know if you need some help testing.
from docker-jetty.
@gregw in jetty-9.4 we have the mail.mod module, which puts javax.mail.glassfish-1.4.1.v201005082020.jar onto the container classpath. That jar contains both the javax.mail apis and the impl. This is tested and working in jdk-11 and beyond.
@janbartel Hi. You seem to be saying that Jetty 9.4 fixes the problem on JDK11+. However on the XWiki project we're using the Jetty docker image 9
tag (which corresponds to 9.4.27
as of today). Yet we still have the issue, see eclipse/jetty.project#2960 (comment)
11:16:11.618 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: Caused by: java.lang.NoClassDefFoundError: javax/activation/DataSource
11:16:11.618 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: at com.xpn.xwiki.plugin.mailsender.MailSenderPlugin.createMimeMessage(MailSenderPlugin.java:229)
...
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
11:16:11.634 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
11:16:11.634 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
11:16:11.634 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
11:16:11.635 [tc-okhttp-stream-1150574999] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: ... 113 common frames omitted
Note that we bundle jakarta.activation-1.2.1.jar
in XWiki's WEB-INF/lib
directory.
So, is Jetty 9.4 supposed to fix the problem? If so I wonder why it's not working for us. Any idea?
Thanks!
from docker-jetty.
Found a solution thanks to a message from @janbartel :)
I've put the following in our jetty-web.xml
:
<Call name="prependSystemClass">
<Arg>-javax.mail.</Arg>
</Call>
<Call name="prependServerClass">
<Arg>javax.mail.</Arg>
</Call>
And it worked :)
from docker-jetty.
@vmassol that's old school syntax (and deprecated)
Use ...
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Get name="systemClasspathPattern">
<Call name="add"><Arg>-javax.mail.</Arg></Call>
</Get>
<Get name="serverClasspathPattern">
<Call name="add"><Arg>javax.mail.</Arg></Call>
</Get>
from docker-jetty.
@joakime Thanks a lot! I was too happy to have found a working workaround that I didn't notice it ;)
from docker-jetty.
This issue has been moved to the new Official Eclipse Jetty Docker repository.
from docker-jetty.
Related Issues (20)
- Issues with Docker Build with 1.8.0_191 HOT 2
- Provide Jetty images based on openjdk:11-jre-slim HOT 7
- jetty:9-jre8 SSL no longer works, FIN sent in reply to CLIENT_HELLO HOT 7
- jetty user home is not properly set HOT 5
- sqlite (used in sqlite-libs) version 3.26.0-r3 has 2 vulnerabilities HOT 1
- Docker image for jetty 10 HOT 3
- TMPDIR /tmp/jetty not used
- Replace sks-keyservers.net HOT 9
- Discontinue building the image based on OpenJDK JRE 7 HOT 1
- Old version 9.4.18 in docker hub HOT 1
- Container exits immediately when using JDWP in JAVA_OPTIONS HOT 4
- Jetty on top of Openjdk-8 JDK version HOT 2
- Add jetty 9 images based on AdoptOpenJDK HOT 1
- Stop supporting deprecated versions of Jetty HOT 5
- Move official docker-jetty project to the jetty project HOT 3
- jetty 9.4.29 released HOT 1
- Empty jetty.start file HOT 5
- start.jar explodes: missing/invalid file modules/alpn-impl/alpn-1.8.0_181.mod HOT 4
- Any plans for jre11 ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-jetty.