Skip to content
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

Mail library included in jetty-jre11 is not compatible with JDK11 #10

Open
joakime opened this issue Jun 8, 2020 · 45 comments
Open

Mail library included in jetty-jre11 is not compatible with JDK11 #10

joakime opened this issue Jun 8, 2020 · 45 comments
Labels

Comments

@joakime
Copy link
Contributor

joakime commented Jun 8, 2020

Issue by geoffreyharding
Friday Jul 19, 2019 at 14:28 GMT
Originally opened as appropriate/docker-jetty#108


There is a bug in the jetty:9.4-jre11 docker image.

The following runtime error is thrown when using javax.mail.internet.MimeMessage:

java.lang.NoClassDefFoundError: javax/activation/DataSource

javax.activation was removed from the JDK in Java 11. Adding javax.activation to the WAR file doesn't fix the runtime bug. The reason is that Jetty is bundled with its own mail, which overrides the one in the WAR.

The solution is to delete the mail from the Jetty dockerfile:

USER root
RUN rm -r /usr/local/jetty/lib/mail
USER jetty

This blog post describes the problem in more detail:
https://www.databasesandlife.com/activation-error-jetty-javamail-java11/

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by gregw
Friday Jul 19, 2019 at 15:07 GMT


@janbartel what did we do to fix this?

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by janbartel
Friday Jul 19, 2019 at 15:20 GMT


@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 jetty/jetty.project#2960.

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by brunojcm
Thursday Oct 10, 2019 at 15:12 GMT


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.

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by brunojcm
Thursday Oct 10, 2019 at 15:54 GMT


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

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by gregw
Friday Oct 11, 2019 at 04:46 GMT


@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!

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by brunojcm
Friday Oct 11, 2019 at 08:10 GMT


@gregw, thanks for the update! Let me know if you need some help testing.

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by vmassol
Tuesday Mar 03, 2020 at 11:57 GMT


@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 jetty/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!

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by vmassol
Tuesday Mar 03, 2020 at 12:10 GMT


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 :)

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by joakime
Tuesday Mar 03, 2020 at 12:25 GMT


@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>

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

Comment by vmassol
Tuesday Mar 03, 2020 at 12:42 GMT


@joakime Thanks a lot! I was too happy to have found a working workaround that I didn't notice it ;)

@vmassol
Copy link

vmassol commented Jun 8, 2020

@joakime BTW note that sadly we're still using this old school syntax because we need it to support both Jetty 9.4.x but also Jetty 9.3.x. I guess there's no way to do an IF in jetty-web.xml, right? :) (it's a bit complex for our use cases to have 2 different distributions). I'm not expecting that to be possible but asking, just in case.

@gregw
Copy link

gregw commented Jun 8, 2020

@vmassol No ifs in XML.... that road leads to a very VERY bad programming language :)

@joakime
Copy link
Contributor Author

joakime commented Jun 8, 2020

@vmassol the old school syntax will work fine for the 9.3 to 9.4 bridge.
But all bets are off when you go from 9.x to 10.x (or even 11.x available in alphas now)

@vmassol
Copy link

vmassol commented Feb 12, 2021

@vmassol the old school syntax will work fine for the 9.3 to 9.4 bridge.
But all bets are off when you go from 9.x to 10.x (or even 11.x available in alphas now)

Maybe this can help some users.

Just upgrading to Jetty 10 and it seems this has changed again. I've tried using

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<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>
</Configure>

But I got in Jetty 10.0.0:

java.lang.NoSuchFieldException: systemClasspathPattern
	at java.base/java.lang.Class.getField(Unknown Source)
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:856)
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:456)
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:369)
	at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:308)
	at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.lambda$configure$0(JettyWebXmlConfiguration.java:86)
	at org.eclipse.jetty.webapp.WebAppClassLoader.runWithServerClassAccess(WebAppClassLoader.java:139)
	at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:84)
	at org.eclipse.jetty.webapp.Configurations.configure(Configurations.java:513)
	at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:519)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1317)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:867

I then checked https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java#L734 and came up with the following which seems to work:

  <Get name="systemClassMatcher">
    <Call name="add"><Arg>-javax.mail.</Arg></Call>
  </Get>
  <Get name="serverClassMatcher">
    <Call name="add"><Arg>javax.mail.</Arg></Call>
  </Get>

@vmassol
Copy link

vmassol commented Feb 12, 2021

@joakime Hi. I'm looking for ideas. XWiki is distributed as a WAR and we have included a jetty-web.xml file so that it works OOB with Jetty. The issue is that this file is now quite different between Jetty 9.4.x and 10.0.0. I would like to provide a single XWiki WAR file (which, btw is working for all servlet containers and not just Jetty). Any idea?

Thanks!

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

The move from pattern to matcher was motivated by the introduction of JPMS in Java 11+ and our support for running Jetty 10+ with JPMS.

Why are you doing this in the WAR?
I would have expected this to be a server level configuration, not a webapp configuration.

@janbartel mail on 9.4.x works regardless of JVM version (as the standalone jetty-home selects the appropriate javax.mail behavior based on JVM), right? jetty-home 10 is the same.

@vmassol
Copy link

vmassol commented Feb 12, 2021

@joakime thanks for your quick reply.

Why are you doing this in the WAR?
I would have expected this to be a server level configuration, not a webapp configuration.

We do this in the WAR because we would like that the XWiki WAR works OOB for users trying to use it on Jetty. If we don't provide the jetty-web.xml file then it'll fail on Jetty 9.4 (which we still support) for example. Then the users will complain, post on the forum and in general don't understand why XWiki doesn't work on Jetty...

@vmassol
Copy link

vmassol commented Feb 12, 2021

@janbartel mail on 9.4.x works regardless of JVM version (as the standalone jetty-home selects the appropriate javax.mail behavior based on JVM), right? jetty-home 10 is the same.

@joakime Note that there's also the DTD issue. Starting with Jetty 10.0.0 it seems mandatory to add <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd"> to jetty-web.xml(it fails without it - was ok in 9.4. without it).

Maybe there's a config to avoid Jetty doing DTD validation?

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

I'm confused, OOB on Jetty 10 is literally nothing, no configuration, no defaults. We no longer have a jetty-distribution, only a jetty-home.

Surely you are using the ${jetty.home} and ${jetty.base} split we've been encouraging for the past 7 years.
What does xwiki want on it's configuration for the users ${jetty.base}? Perhaps the answer lives there.

@vmassol
Copy link

vmassol commented Feb 12, 2021

I'm confused, OOB on Jetty 10 is literally nothing, no configuration, no defaults. We no longer have a jetty-distribution, only a jetty-home.

Yes, I still need to test that I don't need the config (I confirmed it works with it but it's probably not necessary) on Jetty 10.0.0 (it's probably the case since the mail module is no longer provided).

But Jetty 10 is not the issue. The issue is to make it work both on Jetty 9.4 and Jetty 10.0

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

@joakime Note that there's also the DTD issue. Starting with Jetty 10.0.0 it seems mandatory to add <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd"> to jetty-web.xml(it fails without it - was ok in 9.4. without it).

You are not required to use the version 10 DTD, you can still use the 9.3 or even the 9.0 DTD just fine.

I'm surprised that the low level JVM XML validation is requiring the DTD to be present. I'll have to look into that.

This validation was enabled because too many people ignored the warnings from both our XmlConfiguration and the raw JVM XML parser and continued to use features from XmlConfiguration that were deprecated back in the Jetty 7 days, and finally removed in Jetty 10.

@vmassol
Copy link

vmassol commented Feb 12, 2021

You are not required to use the version 10 DTD, you can still use the 9.3 or even the 9.0 DTD just fine.

Indeed good point, I should have thought about that...

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

But Jetty 10 is not the issue. The issue is to make it work both on Jetty 9.4 and Jetty 10.0

The jetty.base for 9.x has --module=mail in it's configuration.
(works on Java 8 and Java 9+, no jetty-web.xml required)

The jetty.base for 10.x has no "mail" module, that is correct.
This is because Jakarta EE 8's mail component is standalone, without an API and IMPL split. There's also no way to split the API and IMPL, as the API requires classes from a specific (glassfish) implementation to function (this is a very controversial decision out of our control).
Starting with Jakarta EE 8, there's no possibility to use alternative javax.mail providers.

If you want to use mail on any Jakarta EE 8 server you have two choices ...

  1. use the all-in-one glassfish mail component from Jakarta EE 8. (this has turned out to be highly undesired, as the combined API+IMPL brings in far too many open source classes that frequently conflict with webapp classes)
  2. don't use a container provided mail component and switch to a webapp provided mail component. (which has always been possible, even as far back as Servlet 1.0)

I'm not sure what Tomcat has done here, but I bet it's one of two decisions.

  1. Not upgrading javax.mail to the Jakarta EE 8 and sticking with an old version of javax.mail.
  2. Just forcing Glassfish Mail on users and dropping support for alternate mail providers.

Anyway, you can have a single ${jetty.base} with javax.mail support work for both Jetty 9.4 and 10.0, but not a webapp with a jetty-web.xml support that.

@vmassol
Copy link

vmassol commented Feb 12, 2021

Surely you are using the ${jetty.home} and ${jetty.base} split we've been encouraging for the past 7 years.
What does xwiki want on it's configuration for the users ${jetty.base}? Perhaps the answer lives there.

I'm not sure I understand this one.

There are several ways to use XWiki and Jetty:

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

Uhm ...

Why do you have these files here?
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules

That tree is incompatible with the desired goal of having support for both Jetty 9.4.x and 10.0.x
Those contents should only come from the unpacked jetty-home tarball.
Most of the files in that git tree should not be copied out of the jetty-home directory to anywhere else.

The xwiki specific modules and etc xml files are good, but can be improved to achieve compatibility.
Start by clearing out all of the module and etc files that are not specific to xwiki (the ones that came from jetty-home).

Next, get rid of your jetty-web.xml sections attempting to manipulate the server and system classes.
If that's all that's in your jetty-web.xml, get rid of the jetty-web.xml entirely.

Next, add this section to the bottom of your modules/xwiki.mod

[ini]
jetty.webapp.addServerClasses+=,-javax.mail.
jetty.webapp.addSystemClasses+=,javax.mail.

Edit: typo on the - character in system classes.

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

This is also an option for compatibility.

Add this to your etc/jetty-xwiki.xml (instead of the 3 lines in your xwiki.mod from the above comment)

This also configures the server level system/server classes used by all webapps (like the proposed lines in your xwiki.mod also do)

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addServerClasses" class="org.eclipse.jetty.webapp.WebAppContext">
    <Arg><Ref refid="Server"/></Arg>
    <Arg>
      <Array type="String">
        <Item>-javax.mail.</Item>
      </Array>
    </Arg>
  </Call>
  <Call name="addSystemClasses" class="org.eclipse.jetty.webapp.WebAppContext">
    <Arg><Ref refid="Server"/></Arg>
    <Arg>
      <Array type="String">
        <Item>javax.mail.</Item>
      </Array>
    </Arg>
  </Call>
</Configure>

@vmassol
Copy link

vmassol commented Feb 12, 2021

That tree is incompatible with the desired goal of having support for both Jetty 9.4.x and 10.0.x

The custom packaging we have is just a demo packaging and users don't even know this is running Jetty. We embed it in our packaging. So we control the version of Jetty we use (9.4.36 ATM).

The need to support both v9.4 and 10.0 is for the other use cases I mentioned:

through a Jetty that's been installed by the user. They have full control on how they start Jetty in this case. This includes using the official Jetty docker image too.

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

  • through a Jetty that's been installed by the user. They have full control on how they start Jetty in this case. This includes using the official Jetty docker image too.

I hope you advocate using the xwiki.mod (seen in your git tree), even for those users. (which both the standalone users, and the docker users will both benefit from)

@vmassol
Copy link

vmassol commented Feb 12, 2021

Just to be clear: we don't have any issue with the custom jetty packaging we do since we control it fully. All this discussion thread should be about what users use (ie when they install Jetty on their own and we don't control anything about their installation, we just provide an XWiki WAR that they deploy on it).

@vmassol
Copy link

vmassol commented Feb 12, 2021

Thanks for your review of our custom jetty packaging though, I'm sure we can learn new things and improve it. I've been maintaining it but I often don't know what I'm doing ;) (especially when upgrading the jetty version, I try to diff the default files coming from jetty and our versions but it's not always easy).

@vmassol
Copy link

vmassol commented Feb 12, 2021

I hope you advocate using the xwiki.mod (seen in your git tree), even for those users. (which both the standalone users, and the docker users will both benefit from)

We don't. So far we've not had to: the jetty-xml.xmlpart is not important and the list of modules listed is pretty basic (xwiki doesn't really require any exotic ones).

What do you have in mind when you say we should advocate it? (I'm curious). Note that we could always advocate it but most users would still not use it.

@vmassol
Copy link

vmassol commented Feb 12, 2021

Next, get rid of your jetty-web.xml sections attempting to manipulate the server and system classes.
If that's all that's in your jetty-web.xml, get rid of the jetty-web.xml entirely.

There's a bit more (see https://github.com/xwiki/xwiki-platform/blob/f870173a837d05b3af08fbf76f5b53767974fc9f/xwiki-platform-core/xwiki-platform-web/src/main/webapp/WEB-INF/jetty-web.xml) but the idea is that we would like that the XWiki WAR works OOB as much as possible, when deployed on any Jetty instance, in whatever way it's been configured by the user.

This is why I've preferred using a jetty-web.xml file (so that the XWiki WAR always deploys fine in all Jetty instances supported). So far we've been able to achieve this. Maybe we're were lucky ;) This is the first time when we cannot find a common config that would work in all the supported jetty versions (our supported jetty version is listed at https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/ServletContainerSupportStrategy/).

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

Just to be clear: we don't have any issue with the custom jetty packaging we do since we control it fully. All this discussion thread should be about what users use (ie when they install Jetty on their own and we don't control anything about their installation, we just provide an XWiki WAR that they deploy on it).

I expect you document how to configure their Jetty instance for use with XWiki?

Keep in mind that jetty is highly modular, and not all users use Jetty the same.
Even users of jetty.docker don't have a "baseline configuration" that all users must use.

As it's 100% possible (and frequently done) to have Jetty not even support hot deploy (those users that have multiple webapps with ordering requirements, or complex webapp startup) or mail or even the concept of webapps (surprising number of users of jetty.docker use ServletContextHandler directly).
It's even possible (and yes, this is done with surprising frequency) to have a Jetty "Server" without a connector at all, doing everything internally, or via a different means of communication to the internal dispatch mechanism.
A common usage is to spin up a jetty.docker image with no connectors to consume backend queues (often filled from other server) to offload processing.

Expecting that your war will just work "out of the box" (a meaningless phrase for Jetty) is not realistic without documenting the Jetty configuration requirements for Xwiki.

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

but the idea is that we would like that the XWiki WAR works OOB as much as possible, when deployed on any Jetty instance, in whatever way it's been configured by the user.

This is the crux of the issue.
This is a false assumption about Jetty and it's user base.

I can show you many valid and common Jetty configurations where your xwiki.war wouldn't even be looked at, let alone deployed.

@vmassol
Copy link

vmassol commented Feb 12, 2021

I expect you document how to configure their Jetty instance for use with XWiki?

We haven't so far and didn't get anyone telling us XWiki wasn't working with their Jetty instance. Again maybe we've been lucky. Or maybe there aren't that many Jetty users (vs Tomcat users). Would not be nice for you ;)

We have stats here: https://www.xwiki.org/xwiki/bin/view/ActiveInstalls/

Note: Most of the 13% of Jetty installs (765) are actually our custom packaging/distribution, which can be checked with the distribution graph (we have a unique id for each packaging/distribution): 193+347 = 540. Which means that we currently have 765-540 = 225 active instances of XWiki in the world out there using their own setup of Jetty.

@vmassol
Copy link

vmassol commented Feb 12, 2021

I can show you many valid and common Jetty configurations where your xwiki.war wouldn't even be looked at, let alone deployed.

Yes I'm sure there are plenty. It's just that the "default" or "standard" (whatever this means) jetty configs you get just works for XWiki. For example the official docker image just works for XWiki.

@vmassol
Copy link

vmassol commented Feb 12, 2021

I note your point about documenting the minimal requirements needed in the Jetty setup for XWiki to deploy fine on Jetty. We need to keep that list as small as possible though.

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

For standalone users of Jetty, (even jetty.docker), advocating the use of xwiki.mod would be the best solution, as it is the ultimate truth on what xwiki needs as in it's configuration.
You can even document that.

@vmassol
Copy link

vmassol commented Feb 12, 2021

For standalone users of Jetty, (even jetty.docker), advocating the use of xwiki.mod would be the best solution, as it is the ultimate truth on what xwiki needs as in it's configuration.
You can even document that.

So basically what you're saying between the lines, is that if users don't use the recommended way (i.e. xwiki.mod) then we would not support them and they'd be on their own. That's a possibility. It's less good than having it work OOB without this need. For example it's nice to have XWiki work OOB with the jetty docker image without having the user to provide some custom config that would add the following (among other things):

[ini]
jetty.webapp.addServerClasses+=,-javax.mail.
jetty.webapp.addSystemClasses+=,javax.mail.

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

The entire xwiki.mod has relevance, even to ensure that other modules are present and required.
That includes the modules webapp (which you cannot expect an installation to have).
Perhaps even annotations (if your xwiki uses servlet annotations, this brings in webapp transitively btw)
and plus (if your xwiki uses jndi)

@vmassol
Copy link

vmassol commented Feb 12, 2021

The entire xwiki.mod has relevance, even to ensure that other modules are present and required.

I get that, but it's really limited.

That includes the modules webapp (which you cannot expect an installation to have).

Well, for deploying a webapp that seems pretty obvious ;)

Perhaps even annotations (if your xwiki uses servlet annotations, this brings in webapp transitively btw)

We don't use servlet annotations (ATM at least).

and plus (if your xwiki uses jndi)

We don't either (not by default at least - xwiki can work fine without it).

@vmassol
Copy link

vmassol commented Feb 12, 2021

PS: Thanks a lot for this discussion @joakime . Much appreciated. :)

@joakime
Copy link
Contributor Author

joakime commented Feb 12, 2021

PS: Thanks a lot for this discussion @joakime . Much appreciated. :)

Thanks.

I hope you reach a point that you are happy with.

Now don't go expecting anything magical with Jetty 11 backward compat, that's a whole other discussion about how xwiki will be impacted by the 'big bang" from Jakarta EE 9.

Speaking of which, do you have long term plans to migrate xwiki? Now that javax.servlet is a dead end with no future updates?

@vmassol
Copy link

vmassol commented Feb 12, 2021

Now don't go expecting anything magical with Jetty 11 backward compat, that's a whole other discussion about how xwiki will be impacted by the 'big bang" from Jakarta EE 9.

Speaking of which, do you have long term plans to migrate xwiki? Now that javax.servlet is a dead end with no future updates?

Yeah we know that this will be painful. We haven't discussed it yet so no plan ATM but we've realized recently that we'll need to draw a plan. For example Tomcat 10 is now the latest version and we're forced to not support it FTM (they were not as nice as you guys with 10.0 and 11.0 ;)).

We have plenty of diverse users including users not upgrading their servlet containers frequently so it would probably be a mistake for us to stop supporting older servlet container versions too fast. So my guess is that we'll have to not support recent versions of servlet containers for a few years before the whole user ecosystem is ready to move.

But this is just my opinion, we need to discuss it.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Apr 16, 2022
fxprunayre added a commit to geonetwork/core-geonetwork that referenced this issue Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants