View Issue Details

IDProjectCategoryView StatusLast Update
0017872CentOS-7libreofficepublic2020-11-20 15:53
ReporterMato 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.9.2009 
Target VersionFixed in Version 
Summary0017872: libreoffice does not recognize custom OpenJDK vendor name
DescriptionStarting 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`.

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:

https://github.com/LibreOffice/core/blob/master/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
Steps To Reproduce1. 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 InformationBug affects both CentOS 7.8 and 7.9
TagsNo tags attached.
abrt_hash
URL

Activities

Mato

Mato

2020-11-20 13:33

reporter   ~0037968

I tested CentOS 8.2.2004 and the problem appears there as well.

Also, java-1.8.0-openjdk-1.8.0.262.b10 seems to work correctly, although some of the newer versions prior to java-1.8.0-openjdk-1.8.0.272.b10 may avoid the problem as well. Downgrading openJDK is a possible workaround in this case.
ManuelWolfshant

ManuelWolfshant

2020-11-20 14:07

manager   ~0037969

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.
Mato

Mato

2020-11-20 15:53

reporter   ~0037970

The bug is now being tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1900004

Issue History

Date Modified Username Field Change
2020-11-19 15:46 Mato New Issue
2020-11-20 13:33 Mato Note Added: 0037968
2020-11-20 14:07 ManuelWolfshant Note Added: 0037969
2020-11-20 15:53 Mato Note Added: 0037970