Bug 1557787 - Not all necessary files are linked when java-1.8.0-openjdk-openjfx.x86_64 is installed
Summary: Not all necessary files are linked when java-1.8.0-openjdk-openjfx.x86_64 is ...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openjfx
Version: 27
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jonny Heggheim
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-18 16:47 UTC by Mark Hammons
Modified: 2018-06-30 17:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-04 20:36:33 UTC


Attachments (Terms of Use)

Description Mark Hammons 2018-03-18 16:47:45 UTC
Description of problem:

When trying to launch rudimentary javafx applications (even a helloworld app), openjdk 8 complains that libprism_sw.so and libprism_es2.so are missing. This is because they appropriate library files in /usr/lib/jvm/openjfx/rt/lib/amd64/ have not been symlinked to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-5.b14.fc27.x86_64/jre/lib/amd64/


Version-Release number of selected component (if applicable):
1.8.0.161-5.b14.fc27

How reproducible:
Should be easily reproducible. Just launch a hello world javafx application with the current openjfx tooling.

Steps to Reproduce:
1. Install openjdk-8
2. Install openjfx
3. Install java-1.8.0-openjdk-openjfx
4. Run a simple hello javafx application

Actual results:

The application crashes out because the required libraries are missing

Expected results:

The application runs (and it does so when the libraries are symlinked in the proper location)

Additional info:

//javafx helloworld
package helloworld;
 
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
 
public class HelloWorld extends Application {
    public static void main(String[] args) {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
 
            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
        
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.show();
    }
}

Comment 1 Mark Hammons 2018-04-04 20:24:14 UTC
Actual stack-trace from trying to run a javafx program with the latest version of openjfx.

[info] Running (fork) loci2vtk.FXApplication 
[info] Prism pipeline init order: es2 sw 
[info] Using java-based Pisces rasterizer
[info] Using dirty region optimizations
[info] Not using texture mask for primitives
[info] Not forcing power of 2 sizes for textures
[info] Using hardware CLAMP_TO_ZERO mode
[info] Opting in for HiDPI pixel scaling
[info] Prism pipeline name = com.sun.prism.es2.ES2Pipeline
[info] Loading ES2 native library ... prism_es2
[error] GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
[error] java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.162-3.b12.fc27.x86_64/jre/lib/amd64/libprism_es2.so
[error] 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
[error] 	at java.lang.Runtime.load0(Runtime.java:809)
[error] 	at java.lang.System.load(System.java:1086)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
[error] 	at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
[info] Prism pipeline name = com.sun.prism.sw.SWPipeline
[error] 	at java.security.AccessController.doPrivileged(Native Method)
[error] 	at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:50)
[error] 	at java.lang.Class.forName0(Native Method)
[error] 	at java.lang.Class.forName(Class.java:264)
[error] 	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] *** Fallback to Prism SW pipeline
[error] GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
[error] java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.162-3.b12.fc27.x86_64/jre/lib/amd64/libprism_sw.so
[error] 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
[error] 	at java.lang.Runtime.load0(Runtime.java:809)
[error] 	at java.lang.System.load(System.java:1086)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
[error] 	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
[error] 	at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
[error] 	at java.security.AccessController.doPrivileged(Native Method)
[error] 	at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
[error] 	at java.lang.Class.forName0(Native Method)
[error] 	at java.lang.Class.forName(Class.java:264)
[error] 	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] Graphics Device initialization failed for :  es2, sw
[error] Error initializing QuantumRenderer: no suitable pipeline found
[error] java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
[error] 	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:221)
[error] 	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:205)
[error] 	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
[error] 	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
[error] 	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
[error] 	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
[error] Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
[error] 	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] Exception in thread "main" java.lang.reflect.InvocationTargetException
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
[error] Caused by: java.lang.RuntimeException: No toolkit found
[error] 	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:217)
[error] 	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
[error] 	at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
[error] 	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
[error] 	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
[error] 	... 5 more
[error] java.lang.RuntimeException: Nonzero exit code returned from runner: 1
[error] 	at sbt.ForkRun.processExitCode$1(Run.scala:33)
[error] 	at sbt.ForkRun.run(Run.scala:42)
[error] 	at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1168)
[error] 	at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1163)
[error] 	at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at scala.util.Try$.apply(Try.scala:209)
[error] 	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

Comment 2 Massimiliano 2018-05-17 15:01:27 UTC
This bug can be reproduced also running mqtt-spy[1]:

$ java -Dprism.verbose=true -jar mqtt-spy-1.0.0.jar

As a workaround you can run:

$ LD_LIBRARY_PATH=/usr/lib/jvm/openjfx/rt/lib/amd64 java -jar mqtt-spy-1.0.0.jar


[1] https://github.com/eclipse/paho.mqtt-spy/wiki

Comment 3 Christian Stadelmann 2018-06-06 07:46:14 UTC
This is a duplicate of bug #1539929 I think. Suggested resolution in that bug is to install java-1.8.0-openjdk-openjfx.

Comment 4 Massimiliano 2018-06-30 17:11:54 UTC
Yes, installing java-1.8.0-openjdk-openjfx solved my issue.


Note You need to log in before you can comment on or make changes to this bug.