You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yaniv Kunda (Jira)" <ji...@apache.org> on 2025/02/01 10:24:00 UTC

[jira] [Commented] (HADOOP-19395) Upgrade javax to jakarta

    [ https://issues.apache.org/jira/browse/HADOOP-19395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922915#comment-17922915 ] 

Yaniv Kunda commented on HADOOP-19395:
--------------------------------------

[~bpatel], I have - and it seems that it might be better to bind this with upgrading Jetty to 10.x - which supports both {{javax}} and {{jakarta}} namespace.
I'm currently trying it out.

> Upgrade javax to jakarta
> ------------------------
>
>                 Key: HADOOP-19395
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19395
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: common
>    Affects Versions: 3.5.0
>            Reporter: Yaniv Kunda
>            Priority: Major
>
> The project uses old libraries in the {{javax.*}} package namespace, mainly {{javax.servlet}} & {{{}javax.annotation{}}}.
> For example, the old servlet-api is included via the following dependency management:
> {code:xml}
> <dependency>
>     <groupId>jakarta.servlet</groupId>
>     <artifactId>jakarta.servlet-api</artifactId>
>     <version>4.0.4</version>
> </dependency>
> {code}
> Note that while the artifact is in maven's {{jakarta.servlet}} namespace, it includes the {{javax.servlet}} classes - versions 5 and above include the {{jakarta.servlet}} classes.
> The scope of its use is extensive, spanning most modules, and in many cases in public classes - however I'm not sure if any are considered a public API.
> One caveat is that the current Jetty version (9.4.x) doesn't work with the {{jakarta.servlet}} namespace, so it will still need to use the previous {{javax.servlet}} namespace, but the latter can be used by getting {{javax.servlet:javax.servlet-api:4.0.1}} specifically where it is used - and having the old namespace for the maven coordinates as well means it wouldn't cause a conflict.
> I believe that the first logical step is to upgrade to version 5.0.0, which is the first version that uses the {{jakarta.*}} package namespace, but is also the last that is Java 8 compatible, and upgrade again to 6.1.0 once hadoop migrates to Java 17 as a minimum A new Java 17 baseline will also support upgrading Jetty, which at the latest version 12 can work with all servlet-api versions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org