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 1900004 - libreoffice does not recognize custom OpenJDK vendor name [rhel-7.9.z]
Summary: libreoffice does not recognize custom OpenJDK vendor name [rhel-7.9.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libreoffice
Version: 7.9
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stephan Bergmann
QA Contact: Bill Sanford
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-20 15:09 UTC by Janne Pulkkinen
Modified: 2024-03-25 17:11 UTC (History)
7 users (show)

Fixed In Version: libreoffice-5.3.6.1-25.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-02 12:00:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 17872 0 None None None 2020-11-20 15:09:09 UTC
Red Hat Product Errata RHBA-2021:0335 0 None None None 2021-02-02 12:00:06 UTC

Description Janne Pulkkinen 2020-11-20 15:09:10 UTC
Description of problem:
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
```

Starting with at least the version java-1.8.0-openjdk-1.8.0.272.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`.

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:

https://github.com/LibreOffice/core/blob/master/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx

Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-1.8.0.272.b10
libreoffice-base-5.3.6.1

How reproducible:
Reproducible most of the time when calling `soffice`. `javaldx` isn't always called for some reason related to the environment, in which case `/usr/lib64/libreoffice/program/javaldx` can be called directly to reproduce the issue.

Steps to Reproduce:
1. Install `java-1.8.0-openjdk` and `libreoffice`.
2. Run `soffice`

Actual results:
The warning `javaldx: Could not find a Java Runtime Environment!` will be printed in addition to the usual output.

Expected results:
No additional output should be printed to stderr

Additional info:
This bug also occurs on CentOS 7.8 and CentOS 8.2.2004.

Downgrading to java-1.8.0-openjdk-1.8.0.262.b10 works as a workaround, although certain newer versions may also work; I haven't tried bisecting the bug further.

Comment 2 Stephan Bergmann 2020-11-20 15:26:15 UTC
The upstream fix is <https://bugs.documentfoundation.org/show_bug.cgi?id=124503> "Support JRE installations with unknown java.vendor property", first appearing in LO 6.1.6.  We could either see backport that, or patch the jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml and jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx files.

Comment 8 Bill Sanford 2020-12-14 15:41:17 UTC
Verified with libreoffice 5.3.6.1-25 & java-1.8.0-openjdk-1.8.0.275.b01-0

Comment 13 errata-xmlrpc 2021-02-02 12:00:02 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 (libreoffice bug fix and enhancement 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/RHBA-2021:0335


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