Summary
Migrate the entire codebase from the legacy Java EE javax.* namespace to Jakarta EE 9+ jakarta.*, and raise the runtime/build baseline accordingly. This is a prerequisite for upgrading Spring Framework to 6.x (and keeping all the transitive deps that have moved to Jakarta).
Motivation
Dependabot PR #770 (bump spring-test 5.3 → 6.0.12) cannot be merged. Spring Framework 6.0 hard-requires Jakarta EE 9+ and Java 17+; its MockHttpServletRequest / MockServletConfig now implement jakarta.servlet.* interfaces, so they no longer satisfy our javax.servlet.* code and compilation fails with ~50 errors across the IT/test sources, e.g.:
incompatible types: org.springframework.mock.web.MockServletConfig
cannot be converted to javax.servlet.ServletConfig
incompatible types: org.springframework.mock.web.MockHttpServletRequest
cannot be converted to javax.servlet.http.HttpServletRequest
We are currently pinned to Spring 5.3.31, which is past end of OSS support. There is no path to a modern Spring/servlet stack without the Jakarta migration — it's the only option.
Scope
Current state in the repo:
- 168 Java files import
javax.servlet (814 import statements total).
- Other
javax.* in play: javax.xml (6), javax.crypto (5, stays javax — JCA is not part of Jakarta), javax.mail (2, → jakarta.mail).
- 122 JSP files +
src/main/webapp/WEB-INF/web.xml (taglib URIs and servlet descriptor move to Jakarta namespaces).
- Packaging is
war, deployed on Tomcat (Dockerfile FROM tomcat:${TOMCAT_DOCKER_VERSION}).
- Compiler
<release> is already 17 — good, satisfies the Spring 6 / Jakarta baseline.
Work items
Notes
javax.crypto stays as-is — it's part of the JCA in the JDK, not Jakarta EE.
- Recommend driving the namespace + import changes with OpenRewrite (
org.openrewrite.recipe:rewrite-migrate-java, recipe org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta) to handle the mechanical bulk and reduce review surface, then hand-fix the JSP/web.xml/Tomcat pieces.
Refs: PR #770 (build failure that surfaced this).
Summary
Migrate the entire codebase from the legacy Java EE
javax.*namespace to Jakarta EE 9+jakarta.*, and raise the runtime/build baseline accordingly. This is a prerequisite for upgrading Spring Framework to 6.x (and keeping all the transitive deps that have moved to Jakarta).Motivation
Dependabot PR #770 (bump
spring-test5.3 → 6.0.12) cannot be merged. Spring Framework 6.0 hard-requires Jakarta EE 9+ and Java 17+; itsMockHttpServletRequest/MockServletConfignow implementjakarta.servlet.*interfaces, so they no longer satisfy ourjavax.servlet.*code and compilation fails with ~50 errors across the IT/test sources, e.g.:We are currently pinned to Spring 5.3.31, which is past end of OSS support. There is no path to a modern Spring/servlet stack without the Jakarta migration — it's the only option.
Scope
Current state in the repo:
javax.servlet(814 import statements total).javax.*in play:javax.xml(6),javax.crypto(5, staysjavax— JCA is not part of Jakarta),javax.mail(2, →jakarta.mail).src/main/webapp/WEB-INF/web.xml(taglib URIs and servlet descriptor move to Jakarta namespaces).war, deployed on Tomcat (DockerfileFROM tomcat:${TOMCAT_DOCKER_VERSION}).<release>is already 17 — good, satisfies the Spring 6 / Jakarta baseline.Work items
javax.servlet:javax.servlet-api:4.0.1→jakarta.servlet:jakarta.servlet-api(6.x, Servlet 6.0).jstl:jstl:1.2with the Jakarta JSTL API + Glassfish impl (jakarta.servlet.jsp.jstl:*).javax.mail→jakarta.mail(com.sun.mail:jakarta.mail/org.eclipse.angus).javax.xmlusages (JAXB/javax.xml.bind→jakarta.xml.bindif any;javax.xml.parsers/SAX stay in the JDK).spring-web/spring-core/spring-context/spring-testto 6.x (then let Dependabot Bump org.springframework:spring-test from 5.3.23 to 6.0.12 #770 ride along / close it).spring-mock/fongotest mocks if they conflict with Jakarta.import javax.servlet*→import jakarta.servlet*across the 168 source files (OpenRewrite recipeorg.openrewrite.java.migrate.jakarta.JavaxServletToJakartaServletis the recommended tool for this).pac4j-saml6.x) and rewrite the 5 SAML servlets (ACS,SLS,SSOLogin,Logout,SSOMetadata) — building aSAML2Configurationfromonelogin.saml.properties, preserving theGetter.authUserSSO(...)hand-off. In-scope migration blocker, done as its own stacked PR.Earlier plan (java-saml 3.0.0 +verified — java-saml's latest release is 2.9.0 (javax-onlyjava-saml-servlet-jakarta) is dead:Auth); the servletless/jakarta split (PR Add Axway to Sponsors #395) is stalled;java-saml-core3.x was never published; the only jakarta artifact (Jumpmind3.0.0.231010) is a 4 KB, 2-class adapter stub with noAuth/core — unusable.http://java.sun.com/jsp/jstl/...→jakarta.tags.*) and any scriptlet imports.web.xmlto the Jakartaweb-appschema/namespace (Servlet 6.0,jakarta.ee).Notes
javax.cryptostays as-is — it's part of the JCA in the JDK, not Jakarta EE.org.openrewrite.recipe:rewrite-migrate-java, recipeorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta) to handle the mechanical bulk and reduce review surface, then hand-fix the JSP/web.xml/Tomcat pieces.Refs: PR #770 (build failure that surfaced this).