jena icon indicating copy to clipboard operation
jena copied to clipboard

Make Fuseki compatible with Jakarta

Open LuLeRoemer opened this issue 2 years ago • 5 comments

Version

4.7.0

Feature

We are trying to use the embedded Fuseki server with Spring Boot version 3.0.1. Unfortunately, we run into a problem where we get a ClassNotFoundException exception for javax.servlet.ServletContext. I assume this is due to the fact that jena-fuseki-core in version 4.7.0 uses jetty-servlets in version 10.0.12. From what I understand, the next major version (11) of jetty-servlets replaces javax.* with the jakarta.* API that Spring Boot provides. As described here, we cannot mix the two.

Are you interested in contributing a solution yourself?

No

LuLeRoemer avatar Feb 17 '23 12:02 LuLeRoemer

The blocker is the WAR file which shares jena-fuseki-core.

It locks to specific versions of Apache Tomcat (Tomcat 10 being the first Jakarka based Tomcat). There are also the Spring Boot 2 users.

Spring Boot 3 was only a few months ago - Nov 2022

See preparation work : #1643

The migration Jakarta 8 to Jakarta 9 is only renaming. It's not all javax.* but identifying which and running the maven shade plugin should perform this conversion. (There are others tools.)

If anyone has tried, we'd like to hear of your experiences.

afs avatar Feb 17 '23 14:02 afs

Seeking information: email to users@ asking about tomcat usage.

afs avatar Feb 22 '23 16:02 afs

The migration Jakarta 8 to Jakarta 9 is only renaming. It's not all javax.* but identifying which and running the maven shade plugin should perform this conversion. (There are others tools.)

Maven Shade works just fine. We are using it in several ASF projects (Geronimo, Johnzon, TomEE, ...) to provide Jakarta ready artifacts via Maven classifiers. It has some drawbacks, but it is most likely a quick win rather than dropping javax support completly :-)

Requires some effort from 3rd party libs too (like shiro, but they are also provide jakarta classified artifacts produced via shade)

We (in TomEE) also documented some of our efforts: https://tomee.apache.org/javax-to-jakarta.html

rzo1 avatar Feb 24 '23 12:02 rzo1

@rzo1,

presumably this works in reverse as well -- convert jakarta.* to javax.* (providing no new capabilities of the various specs are used).

There is likely to be a long tail on javax.* usage because of SpringBoot2 and general slowness of updating to recent Tomcat releases.

If this "down-shading" works, we can move to jakarta.* but still have a way of supporting SpringBoot2 and Tomcat<10.

afs avatar Feb 24 '23 16:02 afs

We plan to switch to jakarka.* at Jena5 (which wil also require Java17). Conversion to jakarka.* has been tried - it was pretty uneventful.

afs avatar Jul 01 '23 21:07 afs