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.
DescriptionBrandon Ingalls
2016-01-27 22:54:50 UTC
Description of problem:
java-1.8.0-openjdk has a higher alternatives priority than java-1.8.0-oracle, this has caused issues with some of our java apps in-house.
In the java-1.8.0-openjdk-headless-1.8.0.65-2.b17.el7_1 package the priority was set to `0000065`
```
$ rpm -qi java-1.8.0-openjdk-headless --scripts
...
alternatives \
--install /usr/bin/java java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/bin/java 0000065 \
...
```
In `java-1.8.0-openjdk-headless-1.8.0.71-2.b15.el7_2.x86_64` the priority has been set to `1800071`.
```
PRIORITY=1800071
if [ "" == "-debug" ]; then
let PRIORITY=PRIORITY-1
fi
ext=.gz
alternatives \
--install /usr/bin/java java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/bin/java $PRIORITY \
...
```
The `java-1.8.0-oracle-1.8.0.71-1jpp.1.el7.x86_64` package sets its priority to `180071`.
Is there any reason OpenJDK should be replacing Oracle's Java?
Version-Release number of selected component (if applicable):
How reproducible:
Install java-1.8.0-oracle-1.8.0.71-1jpp.1.el7.x86_64 and java-1.8.0-openjdk-headless-1.8.0.71-2.b15.el7_2.x86_64, then check alternatives to see which is being used.
Actual results:
```
[root@rhel7-dev-vm2 ~]# alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/java-1.8.0-oracle-1.8.0.71-1jpp.1.el7.x86_64/jre/bin/java
*+ 2 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/bin/java
Enter to keep the current selection[+], or type selection number:
```
Expected results:
```
[root@rhel7-dev-vm2 ~]# alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-1.8.0-oracle-1.8.0.71-1jpp.1.el7.x86_64/jre/bin/java
2 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre/bin/java
Enter to keep the current selection[+], or type selection number:
```
Additional info:
Hello. This is intended behavior. Little bit more can be read at: https://bugzilla.redhat.com/show_bug.cgi?id=1189084
The reason for ibm and oracle being lowered to openjdk is fact, that they are only supplementary, third party products. So we can not quickly enough react on bug in code. On opoiste in openjdk we can. Thats why it is prioritized.
(In reply to jiri vanek from comment #2)
> Hello. This is intended behavior. Little bit more can be read at:
> https://bugzilla.redhat.com/show_bug.cgi?id=1189084
>
> The reason for ibm and oracle being lowered to openjdk is fact, that they
> are only supplementary, third party products. So we can not quickly enough
> react on bug in code. On opoiste in openjdk we can. Thats why it is
> prioritized.
If I install the Oracle package for java it is because I need it for an application to work, the only reason openjdk ever gets installed is because it gets pulled in from other dependencies.
I feel that the package that someone has to go out of their way to install should have priority over openjdk.
All the same I have corrected the issue on our systems with Puppet, it is a bit of a bummer that we now have to manage alternatives for java, where everything worked in the past, this update made many of our enterprise applications unusable.