23.1 xml editor installation on ubuntu 20.10: java problems

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mbreebhotmailcom
Posts: 5
Joined: Wed Mar 10, 2021 2:48 am

23.1 xml editor installation on ubuntu 20.10: java problems

Post by mbreebhotmailcom »

I am trying to install xml editor 23.1 Linux edition on ubuntu 20.10, which immediately leads to the following error:
Unpacking JRE ...
Starting Installer ...
Error: LinkageError occurred while loading main class install4j.Installer3302473039
java.lang.UnsatisfiedLinkError: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.815048.dir/jre/lib/libnio.so: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.815048.dir/jre/lib/libjava.so: version `SUNWprivate_1.1' not found (required by /usr/lib/rt/lib/amd64/libnet.so)
version 21.1 is working on this system, on which the active Java version is the following:
$ java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.10-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
Next, I tried the All versions download. This goes better, but gives the following startup warning:
The Java Virtual Machine (JVM) used to launch <oXygen/> XML Editor is not supported.
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
Problems may occur when running the application with an unsupported Java Virtual Machine.
It is recommended to either get the <oXygen/> XML Editor distribution that includes a JVM
(if available for your platform) or install OpenJDK 8 or 11 (or later) along with OpenJFX.
Can anyone explain this? It wants me to install OpenJDK 8 to solve this, but that's already installed in some form (?) It also seems that the version with preinstalled JVM (the first one) is refused outright? Would appreciate any tips. (I am hesitant to touch the Java installation but if upgrading helps then I am willing to do that).
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: 23.1 xml editor installation on ubuntu 20.10: java problems

Post by adrian »

Hello,

Note that officially the tested and supported Linux distribution for Oxygen v23.1 is Ubuntu 20.04.
The product has been fully tested on Ubuntu 20.04. The latest version of Oxygen might work on other flavors/versions of Linux, but they have not been officially tested.
However, from what we know Oxygen 23.1 should work fine on Ubuntu 20.10 as well.
java.lang.UnsatisfiedLinkError: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.815048.dir/jre/lib/libnio.so: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.815048.dir/jre/lib/libjava.so: version `SUNWprivate_1.1' not found (required by /usr/lib/rt/lib/amd64/libnet.so)
From the UnsatisfiedLinkError exception I would say the OpenJDK 15 Java runtime that is bundled with Oxygen 23.1 tries to load a native library from your system that is for a different version of Java. I'm guessing "/usr/lib/rt/lib/amd64/libnet.so" belongs to this OpenJDK 8 you have installed.
We've tried installing "openjdk-8-jre", but cannot reproduce the issue, the installer still works just as well. You may have something in your environment (e.g. a library path) that causes this.

Regarding the OpenJDK warning. While it's not mentioned there, Oxygen expects the JVM vendor of the OpenJDK JRE to be Oracle. However, for OpenJDK distributions from your Linux distro package system the JVM vendor is usually set to the Linux distribution vendor. So for Ubuntu the JVM vendor of the OpenJDK is Ubuntu, which isn't officially supported by Oxygen.
Anyway, this JVM warning can be ignored. But, since you're using OpenJDK from your distro, I would recommend using at least OpenJDK 11 since it's more recent and it's LTS.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mbreebhotmailcom
Posts: 5
Joined: Wed Mar 10, 2021 2:48 am

Re: 23.1 xml editor installation on ubuntu 20.10: java problems

Post by mbreebhotmailcom »

Thanks for your reply Adrian.

I realized that openjdk 8 was only there because of some older software that I don't use anymore, so I upgraded to openjdk 11.

Result was that now 23.1 doesn't work at all anymore - instead of just the warning that could be ignored before :cry:
$ ./oxygen-64bit-openjdk.sh
Unpacking JRE ...
Starting Installer ...
Error: LinkageError occurred while loading main class install4j.Installer3302473039
java.lang.UnsatisfiedLinkError: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.4985.dir/jre/lib/libnio.so: /home/matthijs/Downloads/oxygen-64bit-openjdk.sh.4985.dir/jre/lib/libjava.so: version `SUNWprivate_1.1' not found (required by /usr/lib/rt/lib/amd64/libnet.so)
Luckily 21.1 is working just fine, so I'll just keep using that and give up on upgrading. Sorry to bother you.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: 23.1 xml editor installation on ubuntu 20.10: java problems

Post by adrian »

Hi,
...,so I upgraded to openjdk 11.
Result was that now 23.1 doesn't work at all anymore - instead of just the warning that could be ignored before :cry:
What's the error message, or how does it fail?

Is openjdk 11 actually working? Try running:

Code: Select all

java -version
List all the installed Java alternatives:

Code: Select all

update-alternatives --list java
You could go back to openjdk 8, reinstall openjdk-8-jre or if that is already installed, use

Code: Select all

update-alternatives --config java
to select openjdk 8 as the default.


Regarding the installer, the UnsatisfiedLinkError indicates you may have a LD_LIBRARY_PATH that points to a wrong location (maybe Java/openjdk 8, or a folder that also holds openjdk 8 libs). This is probably why the Oxygen bundled openjdk is failing, but could also cause your system installed openjdk 11 to fail.
Try running:

Code: Select all

printenv|grep LD_LIBRARY_PATH
If LD_LIBRARY_PATH is set, try unsetting it before running the installer:

Code: Select all

unset LD_LIBRARY_PATH
./oxygen-64bit-openjdk.sh
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
mbreebhotmailcom
Posts: 5
Joined: Wed Mar 10, 2021 2:48 am

Re: 23.1 xml editor installation on ubuntu 20.10: java problems

Post by mbreebhotmailcom »

Hi Adrian,

Because of your reply, I gave it another go.

It seems the "unset LD_LIBRARY_PATH" command is doing the trick in my particular situation

After entering this command, I was able to install the linux version & got this working properly.

Not sure why this works, but counting my blessings....

Thanks again.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: 23.1 xml editor installation on ubuntu 20.10: java problems

Post by adrian »

Hi,

Note that the unset command only has effect for that Terminal session. If you close or restart it, the environment gets reinitialized.
You might want to look into why or from where is LD_LIBRARY_PATH being set in the environment (globally or only for your user account) and for what purpose. As it is set now it will affect Java apps that are using OpenJDK 11 or later (actually Java 9 or later).

Anyway, I'm glad you got it working.
Let us know if you encounter further issues.

Later Edit: I've also logged an issue to check if we can tweak the installer to ignore the LD_LIBRARY_PATH environment variable when running Java. But it might be something that only he installer developer can address.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply