aferrandi / dbtarzan

To explore the tables of a database following their relations as defined in their foreign keys.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The most recent snap does not run

railarem opened this issue · comments

when throwing dbtarzan an exception is returned:

Loading library prism_es2 from resource failed: java.io.IOException: Can not create cache at /home/jonathan/.openjfx/cache/11
java.io.IOException: Can not create cache at /home/jonathan/.openjfx/cache/11
at com.sun.glass.utils.NativeLibLoader.cacheLibrary(NativeLibLoader.java:233)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:203)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:185)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:157)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.prism.es2.ES2Pipeline.(ES2Pipeline.java:50)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Loading library prism_sw from resource failed: java.io.IOException: Can not create cache at /home/jonathan/.openjfx/cache/11
java.io.IOException: Can not create cache at /home/jonathan/.openjfx/cache/11
at com.sun.glass.utils.NativeLibLoader.cacheLibrary(NativeLibLoader.java:233)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:203)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:185)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:157)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.prism.sw.SWPipeline.(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
jonathan@jonathan-pc:~$

my O.S: UBUNTU 19.04

I solverd this problem that manifests itself sometimes (not on my own PC for example).
The solution is to add the following environment variable in the snapcraft.yaml file:

JAVA_TOOL_OPTIONS: "-Duser.home=$SNAP_USER_COMMON"

so that it does not attempt to write in the $HOME/.openjfx/cache/11 which, as far as I understood, can't be used by the application because of security access problems.

I did not release a new version because of a different problem that crashes the application when opening the "open file" dialog to select the jdbc driver jar file, also this only on some machines.
As soon as a I find a solution I will publish a new snap.

The problem should be fixed in version 1.20.1, with the following line in https://github.com/aferrandi/dbtarzan/blob/master/mksnap/snapcraft.mod .

JAVA_TOOL_OPTIONS: "-Duser.home=$SNAP_USER_COMMON -Djdk.gtk.version=2"

Just to explain the reason:

The jar files of JavaFX 11 include some native libraries that are automatically extracted when it is run in the directory $HOME/.openjfx/cache/11. This gives access problems because the directory is outside the snap itself.