LibreOffice doesn't detect JVM because of unexpected java.vendor property value

Bug #1822839 reported by Olivier Tilloy on 2019-04-02
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Medium
libreoffice (Debian)
Won't Fix
Unknown
libreoffice (Ubuntu)
Medium
Olivier Tilloy
Xenial
High
Marcus Tomlinson
Bionic
High
Marcus Tomlinson
Disco
High
Marcus Tomlinson
libreoffice-l10n (Ubuntu)
Medium
Olivier Tilloy
Bionic
High
Marcus Tomlinson
Disco
High
Marcus Tomlinson
openjdk-lts (Ubuntu)
Undecided
Unassigned
Disco
Undecided
Unassigned

Bug Description

[Impact]

 * A recent OpenJDK update changes the value of the "java.vendor" property from "Oracle Corporation" to "Private Build". This breaks the code in LibreOffice that detects an installed JVM.

 * The fix is currently in LibreOffice 6.2.3 on eoan.

[Test Case]

 1. Launch the LibreOffice Start Center
 2. Open Tools > Options
 3. Navigate to LibreOffice > Advanced
 4. A JRE should be listed with Location: /usr/lib/jvm/...

[Regression Potential]

 * This fix is small and concentrated so potential for regression should be relatively low.

 * A combination of autopkgtests and manual testing as described above should provide reasonable confidence that no regressions sneaked in.

Olivier Tilloy (osomon) wrote :
description: updated

Originally reported in Ubuntu: https://launchpad.net/bugs/1822839.

A recent OpenJDK update in Ubuntu 19.04 (to be released later this month) changes the value of the "java.vendor" property, from the well-known name "Oracle Corporation" to "Private Build".

This breaks the code in LibreOffice that detects an installed JVM, because the vendor name is validated against a hardcoded list: https://cgit.freedesktop.org/libreoffice/core/tree/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx?h=libreoffice-6-2#n33.

This change can probably be reverted in Ubuntu, but I'm wondering what the purpose of that hardcoded list of vendors is? Isn't it a valid use case for distributions to change the vendor name?

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → New

So a new string would go into the OS build appropriate XML...

https://opengrok.libreoffice.org/xref/core/jvmfwk/distributions/OpenOfficeorg/

I would guess "Private Build" should be innocuous. But, why is Ubuntu causing itself grief rolling a "Private Build" when the AdoptOpenJDK is community provided? But oh well...

@Stephen?

> @Stephen?

Sorry, s/Stephen/Stephan

This knowledge about java.vendor strings encoded in a javavendors.xml is unfortunately at the heart of how module jvmfwk works internally. I'm looking into changing that at least for current master (towards LO 6.3), so that jvmfwk assumes that a JRE with a java.vendor not listed in javavendors.xml can be used by LO.

(Comment 4 notwithstanding, it would nevertheless be useful if distros like Debian and Ubuntu wouldn't start to rename java.vendor strings from the well-known Oracle to something else.)

Changed in libreoffice (Debian):
status: Unknown → New

I don't have control over what the OpenJDK packages in Debian/Ubuntu are using as a vendor name, but here is some related info:

Possible vendor strings for the Debian/Ubuntu OpenJDK builds are now "Debian", "Ubuntu", and "Private Build", the latter trying to identify a PPA build according to the version number.

$ java -XshowSettings -version 2>&1 | grep vendor
    java.specification.vendor = Oracle Corporation
    java.vendor = Ubuntu
    java.vendor.url = https://ubuntu.com/
    java.vendor.url.bug = https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
    java.vm.specification.vendor = Oracle Corporation
    java.vm.vendor = Ubuntu

And the following distro patch was confirmed to work in Debian by Rene: https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/blob/master/patches/java.vendor-Debian.diff, so I will do something similar for the Ubuntu packages.

And I guess this should be upstreamed in some form, to ensure that the debs built and distributed by TDF are able to find the JVM on Debian/Ubuntu?

Changed in df-libreoffice:
status: New → Confirmed
Adolfo Jayme (fitojb) on 2019-04-04
Changed in libreoffice (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Olivier Tilloy (osomon) on 2019-04-04
Changed in libreoffice (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Olivier Tilloy (osomon)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:6.2.2-0ubuntu2

---------------
libreoffice (1:6.2.2-0ubuntu2) disco; urgency=medium

  [ Rene Engelhard ]
  * debian/patches/java.vendor-Debian.diff: make jvmfwk recognize "Debian"
    as java.vendor as that's what is set in openjdk 11 >= 11.0.3+4-2
    - see #926009 (closes: #926318)

  [ Olivier Tilloy ]
  * debian/patches/java.vendor-Ubuntu.patch: also make jvmfwk recognize
    "Ubuntu" as java.vendor (LP: #1822839)

 -- Olivier Tilloy <email address hidden> Thu, 04 Apr 2019 11:23:38 +0200

Changed in libreoffice (Ubuntu):
status: In Progress → Fix Released

Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3d27b2fa9c5a03f78e5145377402f8a88e3da1be%5E%21

tdf#124503: Support JRE installations with unknown java.vendor property

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

Changed in df-libreoffice:
status: Confirmed → Fix Released

(In reply to Commit Notification from comment #9)
> Stephan Bergmann committed a patch related to this issue.
> It has been pushed to "master":
>
> https://git.libreoffice.org/core/+/
> 3d27b2fa9c5a03f78e5145377402f8a88e3da1be%5E%21
>
> tdf#124503: Support JRE installations with unknown java.vendor property
>
> It will be available in 6.3.0.

See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2019-April/082446.html> "On backporting fix for tdf#124503 'LibreOffice doesn't detect JVM because of unexpected java.vendor property value'" for a discussion whether and how to backport that.

Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/feca4bf320ae33dd1926f3a1afdc77c3b4f7b2a4%5E%21

tdf#124503: Support JRE installations with unknown java.vendor property

It will be available in 6.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/c4aa8b366fb879b0dd37241e70c5842825305620%5E%21

tdf#124503: Support JRE installations with unknown java.vendor property

It will be available in 6.1.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

*** Bug 124855 has been marked as a duplicate of this bug. ***

no longer affects: openjdk-lts (Ubuntu Xenial)
no longer affects: openjdk-lts (Ubuntu Bionic)
Changed in libreoffice (Ubuntu Xenial):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
Changed in libreoffice (Ubuntu Bionic):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
status: New → Triaged
Changed in libreoffice (Ubuntu Xenial):
status: New → Triaged
Łukasz Zemczak (sil2100) wrote :

Can we get an SRU template for this bug? At least a viable test-case could be enough, with bonus points for everything else.

Changed in libreoffice (Ubuntu Disco):
status: New → Incomplete
Changed in libreoffice (Ubuntu Disco):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
description: updated
description: updated
Changed in libreoffice (Ubuntu Disco):
status: Incomplete → In Progress
Changed in libreoffice (Ubuntu Bionic):
importance: Undecided → High
Changed in libreoffice (Ubuntu Disco):
importance: Undecided → High
Changed in libreoffice (Ubuntu Xenial):
importance: Undecided → High
Olivier Tilloy (osomon) on 2019-05-08
Changed in libreoffice (Ubuntu Bionic):
status: Triaged → In Progress
Changed in libreoffice (Ubuntu Xenial):
status: Triaged → In Progress
description: updated

Hello Olivier, or anyone else affected,

Accepted libreoffice into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libreoffice/1:6.2.3-0ubuntu0.19.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libreoffice (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Łukasz Zemczak (sil2100) wrote :

Hello Olivier, or anyone else affected,

Accepted libreoffice-l10n into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libreoffice-l10n/1:6.2.3-0ubuntu0.19.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libreoffice-l10n (Ubuntu Disco):
status: New → Fix Committed
Changed in libreoffice-l10n (Ubuntu Disco):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
importance: Undecided → High
Changed in libreoffice-l10n (Ubuntu):
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Olivier Tilloy (osomon)

Upgraded libreoffice to 1:6.2.3-0ubuntu0.19.04.1 from disco-proposed in a clean and up-to-date disco amd64 VM, and successfully ran test plan at https://wiki.ubuntu.com/Process/Merges/TestPlans/libreoffice.

tags: added: verification-done-disco
removed: verification-needed-disco

This bug is no longer reproducible in

Version: 6.2.4.1 (x64)
Build ID: 170a9c04e0ad25cd937fc7a913bb06bf8c75c11d
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win;
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded

(In reply to Alex Brooks from comment #15)
> This bug is no longer reproducible in
>
> Version: 6.2.4.1 (x64)
> Build ID: 170a9c04e0ad25cd937fc7a913bb06bf8c75c11d
> CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win;
> Locale: en-GB (en_GB); UI-Language: en-GB
> Calc: threaded

Thanks. setting to VERIFIED

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:6.2.3-0ubuntu0.19.04.1

---------------
libreoffice (1:6.2.3-0ubuntu0.19.04.1) disco; urgency=medium

  [ Olivier Tilloy ]
  * debian/patches/java.vendor-Ubuntu.patch: update to also recognize
    "Private Build" as java.vendor (for custom PPA builds) (LP: #1822839)

  [ Marcus Tomlinson ]
  * New upstream release (LP: #1826560)

 -- Marcus Tomlinson <email address hidden> Tue, 30 Apr 2019 13:39:41 +0100

Changed in libreoffice (Ubuntu Disco):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for libreoffice has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice-l10n - 1:6.2.3-0ubuntu0.19.04.1

---------------
libreoffice-l10n (1:6.2.3-0ubuntu0.19.04.1) disco; urgency=medium

  [ Olivier Tilloy ]
  * debian/patches/java.vendor-Ubuntu.patch: update to also recognize
    "Private Build" as java.vendor (for custom PPA builds) (LP: #1822839)

  [ Marcus Tomlinson ]
  * New upstream release (LP: #1826560)

 -- Marcus Tomlinson <email address hidden> Tue, 30 Apr 2019 13:39:41 +0100

Changed in libreoffice-l10n (Ubuntu Disco):
status: Fix Committed → Fix Released

Hello Olivier, or anyone else affected,

Accepted libreoffice into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libreoffice/1:6.0.7-0ubuntu0.18.04.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libreoffice (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

Hello Olivier, or anyone else affected,

Accepted libreoffice into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libreoffice/1:5.1.6~rc2-0ubuntu1~xenial7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libreoffice (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial

Upgraded libreoffice from 1:5.1.6~rc2-0ubuntu1~xenial6 to 1:5.1.6~rc2-0ubuntu1~xenial7 from xenial-proposed in a clean and up-to-date xenial amd64 VM, and verified that the [Test Case] now passes.

tags: added: verification-done-xenial
removed: verification-needed-xenial

Upgraded libreoffice from 1:6.0.7-0ubuntu0.18.04.5 to 1:6.0.7-0ubuntu0.18.04.6 from bionic-proposed in a clean and up-to-date bionic amd64 VM, and verified that the [Test Case] now passes.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:6.0.7-0ubuntu0.18.04.6

---------------
libreoffice (1:6.0.7-0ubuntu0.18.04.6) bionic; urgency=medium

  [ Ikuya Awashiro ]
  * debian/patches/new-japanese-era-name.patch (LP: #1827451):
    Add new Japanse era name "Reiwa" support which taken from upstream:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=597c5d75b8e72d429e096535334eaac7973455ef

  [ Olivier Tilloy ]
  * debian/patches/java.vendor-Ubuntu.patch: update to also recognize
    "Private Build" as java.vendor (for custom PPA builds) (LP: #1822839)
  * debian/patches/java.vendor-Ubuntu.patch: also make jvmfwk recognize
    "Ubuntu" as java.vendor (LP: #1822839)

  [ Rene Engelhard ]
  * debian/patches/java.vendor-Debian.diff: make jvmfwk recognize "Debian"
    as java.vendor as that's what is set in openjdk 11 >= 11.0.3+4-2
    - see #926009 (closes: #926318) (LP: #1822839)
  * debian/control.gtk3.in:
    - make libreoffice-gtk3 recommend gstreamer1.0-gtk3 (LP: #1820062)

 -- Marcus Tomlinson <email address hidden> Tue, 07 May 2019 12:35:49 +0100

Changed in libreoffice (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:5.1.6~rc2-0ubuntu1~xenial7

---------------
libreoffice (1:5.1.6~rc2-0ubuntu1~xenial7) xenial; urgency=medium

  [ Ikuya Awashiro ]
  * debian/patches/new-japanese-era-name.patch (LP: #1827451):
    Add new Japanse era name "Reiwa" support which taken from upstream:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=597c5d75b8e72d429e096535334eaac7973455ef

   [ Olivier Tilloy ]
   * debian/patches/java.vendor-Ubuntu.patch: update to also recognize
     "Private Build" as java.vendor (for custom PPA builds) (LP: #1822839)
   * debian/patches/java.vendor-Ubuntu.patch: also make jvmfwk recognize
     "Ubuntu" as java.vendor (LP: #1822839)

   [ Rene Engelhard ]
   * debian/patches/java.vendor-Debian.diff: make jvmfwk recognize "Debian"
     as java.vendor as that's what is set in openjdk 11 >= 11.0.3+4-2
     - see #926009 (closes: #926318) (LP: #1822839)

 -- Marcus Tomlinson <email address hidden> Fri, 03 May 2019 15:40:44 +0100

Changed in libreoffice (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in libreoffice (Debian):
status: New → Won't Fix
Steve Langasek (vorlon) wrote :

Hello Olivier, or anyone else affected,

Accepted libreoffice-l10n into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libreoffice-l10n/1:6.0.7-0ubuntu0.18.04.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libreoffice-l10n (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
removed: verification-done-bionic
Changed in libreoffice-l10n (Ubuntu Bionic):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
importance: Undecided → High

Upgraded libreoffice-l10n from 1:6.0.7-0ubuntu0.18.04.6 to 1:6.0.7-0ubuntu0.18.04.7 from bionic-proposed in a clean and up-to-date bionic amd64 VM, and verified that the test case passes.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice-l10n - 1:6.0.7-0ubuntu0.18.04.7

---------------
libreoffice-l10n (1:6.0.7-0ubuntu0.18.04.7) bionic; urgency=medium

  * debian/patches/cpdmgr-check-dbus-desc.diff (LP: #1798074):
    - Only create CPDManager if D-Bus descriptions present.
    - Fixes LibreOffice startup crash when CPD packages installed.

libreoffice-l10n (1:6.0.7-0ubuntu0.18.04.6) bionic; urgency=medium

  [ Ikuya Awashiro ]
  * debian/patches/new-japanese-era-name.patch (LP: #1827451):
    Add new Japanse era name "Reiwa" support which taken from upstream:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=597c5d75b8e72d429e096535334eaac7973455ef

  [ Olivier Tilloy ]
  * debian/patches/java.vendor-Ubuntu.patch: update to also recognize
    "Private Build" as java.vendor (for custom PPA builds) (LP: #1822839)
  * debian/patches/java.vendor-Ubuntu.patch: also make jvmfwk recognize
    "Ubuntu" as java.vendor (LP: #1822839)

  [ Rene Engelhard ]
  * debian/patches/java.vendor-Debian.diff: make jvmfwk recognize "Debian"
    as java.vendor as that's what is set in openjdk 11 >= 11.0.3+4-2
    - see #926009 (closes: #926318) (LP: #1822839)
  * debian/control.gtk3.in:
    - make libreoffice-gtk3 recommend gstreamer1.0-gtk3 (LP: #1820062)

 -- Marcus Tomlinson <email address hidden> Fri, 31 May 2019 11:43:00 +0100

Changed in libreoffice-l10n (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.