My Oracle Support Banner

sosreport (or rpm -Va, by default part of a sosreport) may change /usr/java/latest symbolic link if it does not point to latest installed release (Doc ID 1597124.1)

Last updated on AUGUST 20, 2018

Applies to:

Linux OS - Version Oracle Linux 5.0 and later
Linux x86-64
Linux x86

Symptoms

This could only be reproduced with a specific set of circumstances.  This included installing a "newer" java runtime package, such as jre-7u9-linux-i586.rpm, then installing an older JRE version with the --force option.  The --force is required as RPM will not install an older version of the package without being forced to do so.  Some applications may utilize a similar type of configuration, for example a SunRay desktop may require a 32 bit version of Java.  This is suspected to behave similarly on all current versions of Linux, though it has not been verified on every version. 

Example:

  1. install a version of java (the "newer" version for testing - 7u9 here)

  2. install (force) an older version of java (6u30 for testing)
    ->  An rpm -i of the package will fail, as expected, as only one version of

    the package may reside in RPM:
    [root@lnx5]# rpm -i jre-7u9-linux-i586.rpm
    file /etc/init.d/jexec from install of jre-1.7.0_09-fcs.i586
    conflicts with file from package jre-1.6.0_30-fcs.i586

    Therefore, the package must be installed with --force:

    [root@lnx5]# rpm -i jre-6u30-linux-i586.rpm --force
    Unpacking JAR files...
    rt.jar...
    jsse.jar...
    charsets.jar...
    localedata.jar...
    plugin.jar...
    javaws.jar...
    deploy.jar...
      


    Even after doing so, the RPM maintained symlink /usr/java/latest still points
    to the newest version of java:
    [root@lnx5]# ll /usr/java/latest
    lrwxrwxrwx 1 root root 21 Oct  4 10:48 /usr/java/latest ->
    /usr/java/jre1.7.0_09
      


  3. The problem is presumably caused by user deleting the /usr/java/latest
    symlink, and recreating this to point to the older version:

    [root@lnx5]# rm /usr/java/latest
    [root@lnx5]# ln -s /usr/java/jre1.6.0_30 /usr/java/latest
      

  4. Run rpm -Va (or the sosreport, which calls the same).  RPM correctly
    catches this and corrects it, recreating the symlink to point to the true
    latest jre version.  As noted, rpm -Va is called by sosreport (by default).

    (output AFTER running rpm -Va):
    [root@lnx5]# ll /usr/java/latest
    lrwxrwxrwx 1 root root 21 Oct  4 10:48 /usr/java/latest ->
    /usr/java/jre1.7.0_09
      

    For additional information, RPM may be run with debug on:
    rpm -Va --vv
      



Changes

As above, this has only been seen in a case where an older JRE version is installed, with a subsequent recreation of the /usr/java/latest symbolic link to point to the (older) version.  

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.