openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

Upgrade to Jetty 10.x (or Jetty 11.x)

Open joakime opened this issue 2 years ago • 14 comments

Jetty 9.x is now at End of Community Support.

You should be using Jetty 10.x (or newer) at this point.

  • https://github.com/eclipse/jetty.project/issues/7958

joakime avatar Jan 13 '23 14:01 joakime

We are currently upgrading Karaf to 4.4.3 with PaxWeb 8.0.15 (i.e. Jetty 9.4.50). There is some work on Karaf 4.5.x which will support PaxWeb 9 and Jetty 10 (https://lists.apache.org/thread/4lwbt9g0w707zomnq6cfx179n8w90d3h) but we'll have to check when we see a release there.

J-N-K avatar Jan 13 '23 14:01 J-N-K

@J-N-K 4yi, this relates to..

  • https://github.com/openhab/openhab-addons/pull/13570
  • https://github.com/eclipse/jetty.project/issues/9168

andrewfg avatar Jan 13 '23 14:01 andrewfg

The upgrade in Karaf is tracked by issue KARAF-7544.

wborn avatar Mar 22 '23 15:03 wborn

I was checking release notes in relation to #3770 and saw this: https://issues.apache.org/jira/browse/CXF-8764. So for this library we are now at Jetty 10? So we are now bundling both Jetty 9 and 10 because of this dependency? Is it possible in the same way to decouple the dependency for PaxWeb, so that we can use Jetty 10 at the same time as PaxWeb still uses Jetty 9?

jlaur avatar Aug 27 '23 08:08 jlaur

No, we currently only ship Jetty 9, as far as I can see we don't use the bundles that require jetty 10.

We could try if we can upgrade to PaxWeb 9 after Karaf 4.4 (because then we have SLF4J 2.0 available).

J-N-K avatar Aug 27 '23 10:08 J-N-K

BTW, Jetty 12 was released. (with support for EE8 at java.servlet, EE9 at jakarta.servlet, and EE10 at jakarta.servlet at the same time)

Jetty's own tests use PaxWeb for each of these environments.

joakime avatar Aug 27 '23 10:08 joakime

Any idea what will be required to change in bindings when moving to Jetty 10 ?

lolodomo avatar Apr 13 '24 07:04 lolodomo

From my understanding moving to Jetty 10 (PaxWeb 9) only requires adjustments for websockets, see https://eclipse.dev/jetty/documentation/jetty-10/programming-guide/index.html#pg-migration.

J-N-K avatar Apr 13 '24 07:04 J-N-K

Ok, we could then search in code for all the classes that have to be renamed.

lolodomo avatar Apr 13 '24 08:04 lolodomo

^ FWIW when I wrote the Hue API v2 binding, I had to use quite low level HTTP2 code from Jetty 9.x because 10.x was not available. I am guessing that if OH shifts to Jetty 10 that low level code will not be broken. However there may be some opportunity to optimise the binding with newer Jetty 10 higher level features. This observation is fairly hypothetical. But I would look at it in detail once we get the first snapshots with Jetty 10..

andrewfg avatar Apr 13 '24 10:04 andrewfg

Probably there will also be some things to be sorted out with dependencies, i.e. Karaf requiring Jetty 9 (Upgrade to Jetty 10 and Pax Web 9)?

jlaur avatar Apr 13 '24 10:04 jlaur

Correct, well upgrade when Karaf upgrades, and I think this is scheduled for Karaf 4.5.0.

J-N-K avatar Apr 13 '24 10:04 J-N-K

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/unifi-binding-beta-3-2-0-3-6-0/131156/181

openhab-bot avatar Oct 09 '24 22:10 openhab-bot

This issue has been open long enough that Jetty 10 and Jetty 11 are now at End of Community Support.

  • https://github.com/jetty/jetty.project/issues/10485

Jetty 12 is the only supported version of Jetty at this point in time.

joakime avatar Oct 10 '24 10:10 joakime