View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017872||CentOS-7||libreoffice||public||2020-11-19 15:46||2020-11-20 15:53|
|Summary||0017872: libreoffice does not recognize custom OpenJDK vendor name|
|Description||Starting with at least the version java-1.8.0-openjdk-126.96.36.1992.b10-1.el7_9, the Java implementation has the custom VM vendor name "Red Hat, Inc." instead of "Oracle Corporation" as used before. This can be checked using the command `java -XshowSettings:properties -version`.|
When running `soffice`, the executable `/usr/lib64/libreoffice/program/javaldx` will be executed which will check the Java implementation and compare its vendor name against those listed in `/usr/lib64/libreoffice/program/javavendors.xml` and the list stored in the shared library `/usr/lib64/libreoffice/program/libjvmfwklo.so`. If the Java vendor name isn't recognized, the following warning will be printed to stderr:
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
I was able to fix the issue by adding the "Red Hat, Inc." vendor name to both `/usr/lib64/libreoffice/program/javavendors.xml` and the shared library, which is compiled from a CXX file at `jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx`. The exact file can be found from libreoffice-core:
|Steps To Reproduce||1. Install `java-1.8.0-openjdk` and `libreoffice`.|
2. Run `soffice`
3. The warning `javaldx: Could not find a Java Runtime Environment!` will be printed in addition to the usual output.
|Additional Information||Bug affects both CentOS 7.8 and 7.9|
|Tags||No tags attached.|
I tested CentOS 8.2.2004 and the problem appears there as well.
Also, java-1.8.0-openjdk-188.8.131.522.b10 seems to work correctly, although some of the newer versions prior to java-1.8.0-openjdk-184.108.40.2062.b10 may avoid the problem as well. Downgrading openJDK is a possible workaround in this case.
CentOS is a rebuild of the sources used to create RHEL and aims to reproduce RHEL bug for bug and feature for feature. Please submit your request to Redhat via bugzilla.redhat.com and if/when RH accepts it and incorporates it into RHEL and releases a patched version, then CentOS will pick it up automatically.
For easier tracking, please crosslink this bug with the one opened at bugzilla.redhat.com.
|The bug is now being tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1900004|