Zotero Plugin for Libreoffice 7.0.x broken

MacOS 10.15.7, Homebrew openjdk 14.0.1, LibreOffice, Zotero 5.0.90, Zotero LO plugin 5.0.23 installed (from previous versions).

Starting LO, calling Zotero from tool bar brings up a dialog:
"LibreOffice requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under LibreOffice - Preferences - LibreOffice - Advanced. [OK]"

Root cause:
There seems a change in how JDK 14 loads the plugin code. This change prevails in JDK 15.

How to work around this issue:
Installing JDK 12 works -> Zotero plugin gets loaded and works fine
On MacOS simply copy a JDK 12 into the directory /Library/Java/JavaVirtualMachines.
Select it in LO and Zotero works as usual.

This workaround is not a permanent solution. I think, Zotero should look into this issue and fix the problem.
  • edited September 29, 2020
    Unless you're actually doing Java development or using other Java software that requires a newer JDK, you just need the Java 8 JRE, which is the default download for Java for macOS. I believe that's what we link to from the software when Java isn't installed — if not, that should be fixed. We link to the JRE from the troubleshooting instructions.

    @adomasven would know better, but it's not at all clear to me this is a problem in the Zotero plugin rather than in LO 7. I believe the Zotero plugin worked fine with newer Java versions in LO 6.
  • Either way, this is not a Zotero but a LibreOffice and Java compatibility issue and you should report it to LibreOffice developers.
  • @dstillman: The default JDK for Mac is JDK 15 (https://www.oracle.com/java/technologies/javase-downloads.html). Homebrew delivers openjdk 14.0.1 by default (brew info java). No JDK 8. As for LO: Its 7.0.1 now (https://www.libreoffice.org/download/download/)

    @adomasven: I have discussed this issue in length with LO (https://bugs.documentfoundation.org/show_bug.cgi?id=135462). Their work is ok (other plugins work fine). As for Java developers: Oracle provides a platform (JDK 15).

    Summarising: Take an open-minded user, a new Mac (MacOS 10.15.7), install Java (JDK 15), install LO (7.0.1), Zotero (5.0.90) and install the plugin into LO. All standard procedures. Does it work?

    (You may want to ask yourself, does LO and JDK 15 work fine on MacOS 10.15.7 - the answer is: Yes it does)

    I'm pretty sure that - following the above mentioned threads - you will understand this Zotero issue needs urgent fixing.
  • Once again, this is not a Zotero bug. It is a bug with LibreOffice failing to instantiate a Java Virtual Machine with JDK 14 installed. This is what people in your bug report to LibreOffice tell you. Zotero uses the LibreOffice Java plugin architecture to provide integration functionality, but if the said architecture breaks down, we can do nothing to fix it. We can only recommend MacOS Zotero LibreOffice users to use either JRE 8 or JDK 12 with LibreOffice while the LO devs work on a fix.
  • The default JDK for Mac is JDK 15 (https://www.oracle.com/java/technologies/javase-downloads.html). Homebrew delivers openjdk 14.0.1 by default (brew info java). No JDK 8.
    @wolf_rogner: Again, that's the JDK, not the JRE. There's no JRE for recent versions, but the default Java download that Oracle still provides and recommends — literally, if you Google "java download" or go to java.com and click the large Download button — is the Java 8 JRE. It's still updated — the latest update was July — and works fine with LO 7. Unless you're doing Java development or need a newer JDK for something else, there's no reason not to use that until they stop providing security updates. That applies for the vast majority of users. If you need a newer JDK, then you'll need to work this out with the LO devs.
  • edited September 29, 2020
    Actually, it doesn't seem to work on a clean Mac with the current Java 8 JRE. On my Macs where it's working, it's still using the JREs from older Java 8 JDKs rather than the newer Java 8 JRE. It works with the regular Java 8 JRE download — e.g., C:\Program Files\Java\jre1.8.0_241 — on Windows. I'm not sure why it doesn't work with the current Java 8 JRE on macOS.

    In any case, there's nothing we can fix here, other than recommending a version of Java that LibreOffice accepts. On macOS, for LO 7, that seems to be JDK 12. We'll update the documentation accordingly.
  • It's nice to see that you acknowledge the error.

    JDK 12 does not work either (as this gets security updates as well), tried this as well. Currently there is no ordinary way to make Zotero work in combination with LO on Mac.
  • That is simply incorrect. JDK 12 should work with LibreOffice as long as you have it selected in LibreOffice Preferences -> Advanced. You can also downgrade to LibreOffice 6.4.6 where JDK 14 works or wait for 7.1.0 where the JDK 14 issue will be fixed by LO.
  • Right, to be clear, the stable version of LibreOffice is still LibreOffice 6.4, and it continues to work with all JDK versions. Most people are likely still running that — since it doesn't yet auto-upgrade to 7 — and you can always choose to use that until the LO developers fix this bug.

    LibreOffice 7 — for the "technology enthusiast, early adopter or power user" — doesn't work properly with newer JDK versions, but it works with older versions of the JDK. I have it running with the Java 11 JDK from Homebrew (though for some reason I had to copy it to /Library/Java/JavaVirtualMachines rather than symlink it as the keg suggests). The JDK from Oracle (behind a login) probably also works. Versions of the AdoptOpenJDK didn't work for me when I tried.
  • @adomasven: Thank you for your input. If I state that JDK 12 does not work in my constelations, you might trust me that I have verified that more than once (out of curiosity and personal interest that I get a working solution at least). You may claim that on your configurations JDK 12 works. That gives us opportunity to find differences. But insinuating that I tell untrue facts (simply not true...) makes me furious. Maybe you want to focus on other discussions in the meanwhile.

    @dstillman: I agree that LO 7 is claimed for the technology enthusiasts. However, there are some fixes and features that I require (one being that it displays fonts correctly on a Mac HDPI display and not blurs it). So I am caught in a situation where I can either work with blurry text and working Zotero or sharp text and non-functional Zotero.

    I have tested the Oracle verified versions as well (not the GA). The issue is the same.

    Let's conclude this discussion:

    I accept (have to) that this is not on your agenda.
    Please accept that there are a whole bunch of reasons why I need my configuration to work as it is (LO7, JDK14/15,MacOS 10.15.7 or 11).

    Thanks for your patience.
  • Currently there is no ordinary way to make Zotero work in combination with LO on Mac.
    You claim that there is no way to make Zotero work in combination with LO on macOS. That is simply incorrect, and that is what I said. It is not unfathomable, that it does not work for you due to the way something is configured on your machine, but it is not a general problem.

    Helping Zotero users getting the integration to run on various configurations is certainly on our agenda when it's a matter of troubleshooting a config. We have assisted numerous Zotero users with LibreOffice and Java configuration problems in the past and can tell you what we know about troubleshooting but you need to stop insisting that there's some general problem on our side, because there is not.

    You can try setting up a new User Account on your Mac, enable Oracle JDK 11 in LibreOffice and then try to install and use the Zotero plugin. If it works that means there's something with either Java or LibreOffice settings on your default account which is interfering with the JDK working in LibreOffice correctly. If it does not work, I wonder whether you get a different error message as compared to the one you get with JDK 14 and if you do, what that is. You should probably also report that to LibreOffice since they're only investigating incompatibility with JDK 14 and upwards.
Sign In or Register to comment.