Javafx Web 11 - Error initializing QuantumRenderer: no suitable pipeline found

Diogo Vaz picture Diogo Vaz · Jan 15, 2021 · Viewed 7.3k times · Source

My application uses Java Fx Web to display html pages, the problem is that this error appears only when I run the .jar directly because when I run it from my ide (eclipse) it runs without problems. Does anyone have any idea what this is about? I am using AdoptOpenJdk11. I have also tested it on my colleague's computer and it also doesn't work.

Graphics Device initialization failed for :  d3d, 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:244)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:241)
        at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:257)
        at com.rubicon.game.client.window.main.menu.GameMenuPanel.<init>(GameMenuPanel.java:62)
        at com.rubicon.game.client.network.states.LobbyConnectionState.enable(LobbyConnectionState.java:12)
        at com.rubicon.game.client.ClientApplication.loadComponents(ClientApplication.java:115)
        at com.rubicon.game.client.ClientApplication.lambda$initializate$0(ClientApplication.java:98)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
        at com.rubicon.game.client.network.NetworkConnection.lambda$login$0(NetworkConnection.java:124)
        at com.rubicon.game.core.network.packets.PacketResponse.lambda$whenComplete$0(PacketResponse.java:30)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
        at com.rubicon.game.core.network.packets.PacketResponse.complete(PacketResponse.java:24)
        at com.rubicon.game.core.network.packets.request.PacketRequestLogin.onClientReceive(PacketRequestLogin.java:43)
        at com.rubicon.game.client.network.callback.PacketCallbackRequester.onReceive(PacketCallbackRequester.java:33)
        at com.rubicon.game.client.network.NetworkConnection.execute(NetworkConnection.java:94)
        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

Width -Dprism.verbose=true:

Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.ClassNotFoundException: com.sun.prism.d3d.D3DPipeline
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        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:218)
        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)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.ClassNotFoundException: com.sun.prism.sw.SWPipeline
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        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:218)
        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 :  d3d, 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:244)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:241)
        at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:257)
        at com.rubicon.game.client.window.main.menu.GameMenuPanel.<init>(GameMenuPanel.java:62)
        at com.rubicon.game.client.network.states.LobbyConnectionState.enable(LobbyConnectionState.java:12)
        at com.rubicon.game.client.ClientApplication.loadComponents(ClientApplication.java:115)
        at com.rubicon.game.client.ClientApplication.lambda$initializate$0(ClientApplication.java:98)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
        at com.rubicon.game.client.network.NetworkConnection.lambda$login$0(NetworkConnection.java:124)
        at com.rubicon.game.core.network.packets.PacketResponse.lambda$whenComplete$0(PacketResponse.java:30)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
        at com.rubicon.game.core.network.packets.PacketResponse.complete(PacketResponse.java:24)
        at com.rubicon.game.core.network.packets.request.PacketRequestLogin.onClientReceive(PacketRequestLogin.java:43)
        at com.rubicon.game.client.network.callback.PacketCallbackRequester.onReceive(PacketCallbackRequester.java:33)
        at com.rubicon.game.client.network.NetworkConnection.execute(NetworkConnection.java:94)
        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

And in the line 62 im only creating a JFXPanel Object.... JFXPanel Object Creation Image

Maven Dependencies? (Maybe need more? Maybe need another version?)

<dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-web</artifactId>
        <version>15</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-swing</artifactId>
        <version>15</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-graphics</artifactId>
        <version>15</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>15</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-base</artifactId>
        <version>15</version>
    </dependency>

Any additional necessary information just ask!

Solved! (MinimizeZar problem in maven)

Answer

ahmed picture ahmed · Dec 19, 2021

If someone comes here to get help about this error, add this line to your pom

<classifier>mac</classifier>

depending on your target platform : mac , linux, win

So the block becomes like

    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-graphics</artifactId>
        <version>17</version>
        <classifier>mac</classifier>
    </dependency>