Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
ant is non-functional in RHEL 6.5 if used with openjdk 1.8.
Version-Release number of selected component (if applicable):
# rpm -qa | grep java
java-1.8.0-openjdk-headless-1.8.0.20-3.b26.el6.x86_64
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
java-1.8.0-openjdk-devel-1.8.0.20-3.b26.el6.x86_64
tzdata-java-2014h-1.el6.noarch
java-1.8.0-openjdk-1.8.0.20-3.b26.el6.x86_64
java_cup-0.10k-5.el6.x86_64
# rpm -qa | grep ant
ant-1.7.1-13.el6.x86_64
How reproducible:
100%, initially encountered when our RHEL 6 buildroots broke in brew, reproduced on a clean 6.5 system just by installing openjdk 1.8, then ant.
Steps to Reproduce:
1. yum install java-1.8.0-openjdk
2. yum install ant
3. run "ant"
Actual results:
# ant
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
Expected results:
ant should be functional, this does not appear to be an issue with openjdk 1.6 or 1.7. Possible this is a JDK packaging bug but starting with ant.
Additional info:
# rpm -q --requires ant
/bin/sh
/bin/sh
config(ant) = 0:1.7.1-13.el6
java-devel >= 0:1.5.0
jpackage-utils >= 0:1.7.5
jpackage-utils >= 0:1.7.5
jpackage-utils >= 0:1.7.5
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libdl.so.2()(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcj_bc.so.1()(64bit)
libm.so.6()(64bit)
libpthread.so.0()(64bit)
librt.so.1()(64bit)
libz.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)
xerces-j2
xml-commons-jaxp-1.3-apis
rpmlib(PayloadIsXz) <= 5.2-1
Results are mixed if I don't have openjdk 1.8 installed beforehand.
If I just install ant with no jdk, it appears to install and run fine but with openjdk 1.6:
Installed:
ant.x86_64 0:1.7.1-13.el6
Dependency Installed:
java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6 java-1.6.0-openjdk.x86_64 1:1.6.0.0-11.1.13.4.el6 java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-11.1.13.4.el6 java_cup.x86_64 1:0.10k-5.el6
sinjdoc.x86_64 0:0.5-9.1.el6 xerces-j2.x86_64 0:2.7.1-12.7.el6_5 xml-commons-apis.x86_64 0:1.3.04-3.6.el6 xml-commons-resolver.x86_64 0:1.1-4.18.el6
If I try to first manually install openjdk 1.7.0, then install ant, it pulls in 1.6.0... (and works fine)
But with 1.8.0, it does not pull 1.6.0.
>
> If I try to first manually install openjdk 1.7.0, then install ant, it pulls
> in 1.6.0... (and works fine)
>
> But with 1.8.0, it does not pull 1.6.0.
It should not happen, but there was bug on this, and it was fixed. So now no jdk is pulling different jdk.
Ant should work with *only* jdk6 or *only* jdk7 or *only* jdk8
This turned out to be a bug in jpackage-utils. Patching jpackage-utils will make ant work with OpenJDK 8.
*** This bug has been marked as a duplicate of bug 1149605 ***