Removing OpenJDK 17 removes Tomcat and ecj in RHEL 9 when migrating to OpenJDK 21

Solution Unverified - Updated -

Issue

When attempting to uninstall java-17-openjdk and java-17-openjdk-headless after installing java-21-openjdk on RHEL 9, tomcat, tomcat-lib, and ecj packages are automatically selected for removal due to dependency resolution:

[root@localhost ~]# dnf remove java-17-openjdk java-17-openjdk-devel java-17-openjdk-headless
Updating Subscription Management repositories.
Dependencies resolved.
==============================================================================================================
 Package                     Arch      Version                     Repository                            Size
==============================================================================================================
Removing:
 java-17-openjdk-headless    x86_64    1:17.0.20.0.8-1.2.el9       @rhel-9-for-x86_64-appstream-rpms    196 M
Removing dependent packages:
 tomcat                      noarch    1:9.0.117-2.el9_8           @rhel-9-for-x86_64-appstream-rpms    324 k
Removing unused dependencies:
 ecj                         noarch    1:4.20-17.el9               @rhel-9-for-x86_64-appstream-rpms    2.1 M
 javapackages-tools          noarch    6.4.0-1.el9                 @rhel-9-for-x86_64-appstream-rpms     72 k
 tomcat-el-3.0-api           noarch    1:9.0.117-2.el9_8           @rhel-9-for-x86_64-appstream-rpms    229 k
 tomcat-jsp-2.3-api          noarch    1:9.0.117-2.el9_8           @rhel-9-for-x86_64-appstream-rpms    145 k
 tomcat-lib                  noarch    1:9.0.117-2.el9_8           @rhel-9-for-x86_64-appstream-rpms    6.9 M
 tomcat-servlet-4.0-api      noarch    1:9.0.117-2.el9_8           @rhel-9-for-x86_64-appstream-rpms    612 k

Environment

  • Red Hat Enterprise Linux (RHEL) 9
  • tomcat
  • ecj-4.20-17.el9
  • Java 21 (OpenJDK 21)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content