RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2173874 - Tomcat installs older java even though newer java is installed
Summary: Tomcat installs older java even though newer java is installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: tomcat
Version: 8.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: huwang
QA Contact: tomcat-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-28 08:39 UTC by Matus Madzin
Modified: 2023-11-14 17:10 UTC (History)
5 users (show)

Fixed In Version: tomcat-9.0.62-14.el8_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-14 15:37:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-149997 0 None None None 2023-02-28 08:40:30 UTC
Red Hat Knowledge Base (Solution) 7031253 0 None None None 2023-08-31 06:27:12 UTC
Red Hat Product Errata RHSA-2023:7065 0 None None None 2023-11-14 15:37:59 UTC

Description Matus Madzin 2023-02-28 08:39:28 UTC
Description of problem:
When Tomcat is installed it requires Java 8 even though Java 11 is already installed.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Check that only Java 17 is installed on the system.
2. Try to install Tomcat
3. Check packages which are supposed to be installed

Actual results:
Java 11 is installed

Expected results:
No Java should be installed

Additional info:

Comment 14 Christian Horn 2023-08-31 05:17:03 UTC
We have a partner who has tried to verify this bz.
He tied his system do nightly builds repository, which carries tomcat-9.0.62-10.el8 .

Our partner reports that now, running 'dnf install tomcat', 
which is correctly picking up tomcat-9.0.62-10.el8, also 
'java-1.8.0-openjdk-headless' is attempted to get installed.
That's not desired as java is already installed on the system:

  # rpm -qa |grep java
  java-11-openjdk-11.0.20.0.8-2.el8.x86_64
  javapackages-filesystem-5.3.0-1.module+el8+2447+6f56d9a6.noarch
  java-11-openjdk-headless-11.0.20.0.8-2.el8.x86_64

Comment 15 Christian Horn 2023-09-01 00:21:28 UTC
Our partner is also wondering:
on rhel8.8, which java versions do we 'support' for using 'tomcat'?

As per above, one would end up with 2 java versions installed,
and repos have 1 or 2 further java versions.

Comment 16 masanari iida 2023-09-06 10:19:39 UTC
Would you mind to answer following questions?

(1) On RHEL8.8, which version of Java openjdk is supported by tomcat?

(2) If tomcat support Java-11-openjdk, but still dnf pulls java-1.8.0-openjdk-headless,
can I remove the java-1.8.0-openjdk-headless using --nodeps option?

Comment 17 Christian Horn 2023-09-06 23:11:26 UTC
(In reply to masanari iida from comment #16)
> (2) If tomcat support Java-11-openjdk, but still dnf pulls
> java-1.8.0-openjdk-headless,
> can I remove the java-1.8.0-openjdk-headless using --nodeps option?

We do not recommend that.  This bz exists to properly solve the
question via fixing the dependencies (and in the first place to
clarify whether the old or the new java is intended to be used
by the tomcat package).
I have reached out to the colleague who apparently does QE in that
area, but did not get a reply, just sent a reminder.

Comment 18 Coty Sutherland 2023-09-07 19:10:08 UTC
Any version of OpenJDK that the platform provides is supported for use with Apache Tomcat; the minimum version that is supported is java-8 which is why it was required. Now that there are higher versions available we are adjusting the RPM Requires to allow for java-8, java-11, or java-17 to be used.

Comment 19 Christian Horn 2023-10-11 01:19:26 UTC
I tried to verify this, but was not able.

- install rhel8.8GA
- update to RHEL-8.9.0-20231009.25 nightly build (which has fixed tomcat-9.0.62-14.el8_9)

- install java-17-openjdk
  # dnf -y install java-17-openjdk
- verify installation
  # rpm -qa|grep java
  javapackages-filesystem-5.3.0-1.module+el8+2447+6f56d9a6.noarch
  tzdata-java-2023c-1.el8.noarch
  java-17-openjdk-headless-17.0.8.0.7-2.el8.x86_64
  java-17-openjdk-17.0.8.0.7-2.el8.x86_64
- Try to install Tomcat, verify if it pulls in older Java:

# dnf install tomcat
[..]
Installing:
 tomcat                                      noarch                 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream                  91 k
Installing dependencies:
 ecj                                         noarch                 1:4.20-10.el8                                     rhel-8.8-AppStream                 2.0 M
 java-1.8.0-openjdk-headless                 x86_64                 1:1.8.0.382.b05-2.el8                             rhel-8.9-AppStream                  34 M
 javapackages-tools                          noarch                 5.3.0-1.module+el8+2447+6f56d9a6                  rhel-8.8-AppStream                  44 k
 tomcat-el-3.0-api                           noarch                 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream                 106 k
 tomcat-jsp-2.3-api                          noarch                 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream                  65 k
 tomcat-lib                                  noarch                 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream                 5.9 M
 tomcat-servlet-4.0-api                      noarch                 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream                 286 k
[..]

Seems to me like java-1.8.0-openjdk-headless gets pulled in again?

Comment 20 huwang 2023-10-27 00:24:19 UTC
Tomcat isn't the only thing that requires Java. The ecj and javapackages-tools package also require java and tomcat depends on ecj and javapackages-tools. I have updated tomcat so that it can use any java version, but the ecj and javapackages-tools package both require java-8, so that's what get's installed.
For ecj, I will fix it in rhel-8.10.0. javapackages-tools need to updated by the packager maintainer.

(In reply to Christian Horn from comment #19)
> I tried to verify this, but was not able.
> 
> - install rhel8.8GA
> - update to RHEL-8.9.0-20231009.25 nightly build (which has fixed
> tomcat-9.0.62-14.el8_9)
> 
> - install java-17-openjdk
>   # dnf -y install java-17-openjdk
> - verify installation
>   # rpm -qa|grep java
>   javapackages-filesystem-5.3.0-1.module+el8+2447+6f56d9a6.noarch
>   tzdata-java-2023c-1.el8.noarch
>   java-17-openjdk-headless-17.0.8.0.7-2.el8.x86_64
>   java-17-openjdk-17.0.8.0.7-2.el8.x86_64
> - Try to install Tomcat, verify if it pulls in older Java:
> 
> # dnf install tomcat
> [..]
> Installing:
>  tomcat                                      noarch                
> 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream        
> 91 k
> Installing dependencies:
>  ecj                                         noarch                
> 1:4.20-10.el8                                     rhel-8.8-AppStream        
> 2.0 M
>  java-1.8.0-openjdk-headless                 x86_64                
> 1:1.8.0.382.b05-2.el8                             rhel-8.9-AppStream        
> 34 M
>  javapackages-tools                          noarch                
> 5.3.0-1.module+el8+2447+6f56d9a6                  rhel-8.8-AppStream        
> 44 k
>  tomcat-el-3.0-api                           noarch                
> 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream        
> 106 k
>  tomcat-jsp-2.3-api                          noarch                
> 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream        
> 65 k
>  tomcat-lib                                  noarch                
> 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream        
> 5.9 M
>  tomcat-servlet-4.0-api                      noarch                
> 1:9.0.62-14.el8_9                                 rhel-8.9-AppStream        
> 286 k
> [..]
> 
> Seems to me like java-1.8.0-openjdk-headless gets pulled in again?

Comment 22 errata-xmlrpc 2023-11-14 15:37:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: tomcat security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:7065


Note You need to log in before you can comment on or make changes to this bug.