Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
miku
Posts: 5
Joined: 11 Feb 2021, 20:33

Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by miku »

Hi all,

I need your help. Im struggling with running a jnlp web url on Ubuntu 18.04.4 LTS 64-bit

Used javac:
/usr/lib/jvm/java-1.8.0-amazon-corretto/bin/javac

Used java:
/usr/lib/jvm/java-1.8.0-amazon-corretto/jre/bin/java

Used openwebstart:
OpenWebStart 1.3.2

Everything is running completely fine on windows and mac, but when im trying to run it on ubuntu im getting following error msg:

Code: Select all

[ITW-CORE][2021-02-11 20:57:39.684 CET][ERROR][net.sourceforge.jnlp.AbstractLaunchHandler]
netx: Launch Error: Could not launch JNLP file. ( (java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so (Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so)))
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:408)
	at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:70)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:654)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:401)
	... 2 more
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1088)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:156)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
	at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
	at com.sun.glass.ui.Application.run(Application.java:146)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
	... 5 more

[ITW-CORE][2021-02-11 20:57:39.684 CET][ERROR][net.sourceforge.jnlp.Launcher]
Launch exception
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:408)
	at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:70)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:654)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:401)
	... 2 more
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1088)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:156)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
	at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
	at com.sun.glass.ui.Application.run(Application.java:146)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
	... 5 more
Could you pls take a look! Thx! :)

Best!

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by Janak Mulani »

Hi

javac is irrelevant. For running an app specified in a jnlp file you need to specify in the jnlp which JRE you want to use run the app. OWS then looks for that JRE on your machine or tries to download it. You can specify using the itw-settings tool how OWS manages the JVM used to run the app. Please see

https://openwebstart.com/docs/OWSGuide.html

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by Stephan Classen »

Also when you enable log to file there are always 2 log files created. "stage1" and "stage2".
In the stage1 log file you can find the command which is used to launch stage2. This command includes the path to the JVM for stage 2 so you can make sure that expected/required JVM is used.

miku
Posts: 5
Joined: 11 Feb 2021, 20:33

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by miku »

Thx @Janak Mulani and @Stephan Classen.

I just see I put java and javac just to be sure, but forgot about the most important thing. :roll: That's my settings coming from the itw-settings.

Image

I just enabled logs as @Janak Mulani suggested. The last part of the stage1 is

Code: Select all

[ITW-CORE][2021-02-12 10:54:53.870 CET][INFO ][com.openwebstart.launcher.OwsJvmLauncher] About to launch external with commands: '[/usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java, -Xbootclasspath/a:/opt/OpenWebStart/openwebstart.jar, -Xms256m, -Xmx1536m, net.sourceforge.jnlp.runtime.Boot, -Xnofork, https://example.karakun.net/app/prod.jnlp?timestamp=1613123691]'
[ITW-CORE][2021-02-12 10:55:11.551 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.LeastRecentlyUsedCache] No other instances of javaws are running
So it looks like its using the correct JVM. :(

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by Stephan Classen »

Can you start the application locally (without webstart) using the exact same JVM (/usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java)
JavaFX and JVM 1.8.0 with a bugfix version greater than 200 (in your case this is 282) are known to have problems

miku
Posts: 5
Joined: 11 Feb 2021, 20:33

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by miku »

Thanks for your fast reply.

Yes, I can start the application locally (without webstart) using exact the same JVM.

Should I downgrade my version to less 200? I just quickly check corretto repository and I think they dont provide any version less than 200.

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by Stephan Classen »

I don't think downgrading is the solution. But I am kind of running out of ideas.

Just to state the obvious:
Can you check that the file /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/amd64/libglassgtk3.so exists and is readable by the user which is starting the JNLP

miku
Posts: 5
Joined: 11 Feb 2021, 20:33

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by miku »

wow, i checked it before and was pretty sure the file is there.

But I propbaly mistaken the numbers there is only libglass.so and libglassgtk2.so. libglassgtk3.so is missing. :shock:

miku
Posts: 5
Joined: 11 Feb 2021, 20:33

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by miku »

I just tried to test to copy this file from:

1) Oracle Java - It's working (definitely not the right solution)
2) OpenFX 'https://gluonhq.com/download/javafx-11-0-2-sdk-linux/' - It's not working Im getting

Code: Select all

[ITW-CORE][2021-02-12 15:54:16.476 CET][ERROR][net.sourceforge.jnlp.AbstractLaunchHandler]
netx: Launch Error: Could not launch JNLP file. ( (java.lang.NoSuchMethodError: <init> (<init>)))
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:408)
	at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:70)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:654)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:401)
	... 2 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: <init>
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: <init>
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1088)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:156)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
	at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
	at com.sun.glass.ui.Application.run(Application.java:146)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
	... 5 more

[ITW-CORE][2021-02-12 15:54:16.476 CET][ERROR][net.sourceforge.jnlp.Launcher]
Launch exception
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:408)
	at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:70)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:654)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:401)
	... 2 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: <init>
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: <init>
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1088)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:156)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
	at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
	at com.sun.glass.ui.Application.run(Application.java:146)
	at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
	... 5 more

[ITW-CORE][2021-02-12 15:54:31.506 CET][INFO ][net.sourceforge.jnlp.cache.NativeLibraryStorage] Cleaning up native directory /tmp/netx-native-26642
[ITW-CORE][2021-02-12 15:54:31.513 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.LeastRecentlyUsedCache] Other instances of javaws are running
[ITW-CORE][2021-02-12 15:54:31.513 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.LeastRecentlyUsedCache] Cannot clear the cache at this time. Try later. If the problem persists, try closing your browser(s) & JNLP applications. At the end you can try to kill all java applications. You can clear cache by javaws -Xclearcache or via itw-settings Cache -> View files -> Purge
[ITW-CORE][2021-02-12 15:54:31.586 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.LeastRecentlyUsedCache] No other instances of javaws are running
Do you have maybe any idea about any clean solution how to solve it? Thx!

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Running web jnlp on Ubuntu 18.04 LTS 64 - Can't load library:ibglassgtk3.so

Post by Stephan Classen »

Can you share the JNLP with us.

The error suggests that either a the native lib is not found or the method which the java code is trying to invoke cannot be found.
There are two likely causes.
JavaFX is not referenced correctly in the JNLP (hence we want to take a look at that file)
Or you have an incompatible version of the native lib on you computer and thus the method is not in the lib

Post Reply