09 January 2021

blog java mqtt diy

Circonstances

Le Paho-MQTT est un projet d'Eclipse pour fournir une base dans pluisieurs langages pour utiliser MQTT. Parmi ces projets, mqtt-spy, un gui qui à l'air intéressant pour naviguer sur un serveur MQTT.

Difficulté, les projets ne compilent pas correctement sur ma station Ubuntu 20.04.

Compilation à partir des sources

https://github.com/eclipse/paho.mqtt-spy.git

$ mvn clean
$ mvn package 
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.eclipse.paho.mqttspy:mqtt-spy-daemon:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 113, column 15
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.eclipse.paho.mqttspy:mqtt-spy:jar:1.0.1-beta
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 134, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] spy-common                                                         [jar]
[INFO] spy-common-ui                                                      [jar]
[INFO] mqtt-spy-common                                                    [jar]
[INFO] mqtt-spy-daemon                                                    [jar]
[INFO] mqtt-spy                                                           [jar]
[INFO] mqtt-spy project                                                   [pom]
[INFO] 
[INFO] ----------------< org.eclipse.paho.mqttspy:spy-common >-----------------
[INFO] Building spy-common 1.0.1                                          [1/6]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-xjc:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-jaxb2-plugin:0.12.1:generate (spy-common) @ spy-common ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] spy-common 1.0.1 ................................... FAILURE [  5.913 s]
[INFO] spy-common-ui 1.0.1 ................................ SKIPPED
[INFO] mqtt-spy-common 1.0.1 .............................. SKIPPED
[INFO] mqtt-spy-daemon 1.0.0 .............................. SKIPPED
[INFO] mqtt-spy 1.0.1-beta ................................ SKIPPED
[INFO] mqtt-spy project 0.0.1-SNAPSHOT .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.165 s
[INFO] Finished at: 2021-01-09T19:07:04+01:00
[INFO] ------------------------------------------------------------------------
---------------------------------------------------
constituent[0]: file:/usr/share/maven/conf/logging/
constituent[1]: file:/usr/share/maven/lib/maven-settings-3.x.jar
constituent[2]: file:/usr/share/maven/lib/maven-artifact-3.x.jar
constituent[3]: file:/usr/share/maven/lib/jsr250-api.jar
constituent[4]: file:/usr/share/maven/lib/maven-settings-builder-3.x.jar
constituent[5]: file:/usr/share/maven/lib/slf4j-api.jar
constituent[6]: file:/usr/share/maven/lib/wagon-http-shaded.jar
constituent[7]: file:/usr/share/maven/lib/maven-resolver-util.jar
constituent[8]: file:/usr/share/maven/lib/maven-repository-metadata-3.x.jar
constituent[9]: file:/usr/share/maven/lib/javax.inject.jar
constituent[10]: file:/usr/share/maven/lib/plexus-interpolation.jar
constituent[11]: file:/usr/share/maven/lib/commons-cli.jar
constituent[12]: file:/usr/share/maven/lib/maven-builder-support-3.x.jar
constituent[13]: file:/usr/share/maven/lib/sisu-inject.jar
constituent[14]: file:/usr/share/maven/lib/maven-plugin-api-3.x.jar
constituent[15]: file:/usr/share/maven/lib/maven-resolver-connector-basic.jar
constituent[16]: file:/usr/share/maven/lib/maven-model-builder-3.x.jar
constituent[17]: file:/usr/share/maven/lib/maven-shared-utils.jar
constituent[18]: file:/usr/share/maven/lib/maven-model-3.x.jar
constituent[19]: file:/usr/share/maven/lib/plexus-sec-dispatcher.jar
constituent[20]: file:/usr/share/maven/lib/wagon-provider-api.jar
constituent[21]: file:/usr/share/maven/lib/guice.jar
constituent[22]: file:/usr/share/maven/lib/maven-slf4j-provider-3.x.jar
constituent[23]: file:/usr/share/maven/lib/maven-embedder-3.x.jar
constituent[24]: file:/usr/share/maven/lib/plexus-utils.jar
constituent[25]: file:/usr/share/maven/lib/commons-lang3.jar
constituent[26]: file:/usr/share/maven/lib/jansi.jar
constituent[27]: file:/usr/share/maven/lib/maven-resolver-spi.jar
constituent[28]: file:/usr/share/maven/lib/commons-io.jar
constituent[29]: file:/usr/share/maven/lib/cdi-api.jar
constituent[30]: file:/usr/share/maven/lib/sisu-plexus.jar
constituent[31]: file:/usr/share/maven/lib/maven-resolver-provider-3.x.jar
constituent[32]: file:/usr/share/maven/lib/maven-compat-3.x.jar
constituent[33]: file:/usr/share/maven/lib/maven-core-3.x.jar
constituent[34]: file:/usr/share/maven/lib/aopalliance.jar
constituent[35]: file:/usr/share/maven/lib/plexus-component-annotations.jar
constituent[36]: file:/usr/share/maven/lib/maven-resolver-transport-wagon.jar
constituent[37]: file:/usr/share/maven/lib/maven-resolver-impl.jar
constituent[38]: file:/usr/share/maven/lib/guava.jar
constituent[39]: file:/usr/share/maven/lib/wagon-file.jar
constituent[40]: file:/usr/share/maven/lib/maven-resolver-api.jar
constituent[41]: file:/usr/share/maven/lib/plexus-cipher.jar
constituent[42]: file:/usr/share/maven/lib/jcl-over-slf4j.jar
---------------------------------------------------
Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: com.sun.tools.xjc.addon.accessors.PluginImpl Unable to get public no-arg constructor
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:584)
	at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:675)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1234)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1266)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
	at com.sun.tools.xjc.Options.findServices(Options.java:960)
	at com.sun.tools.xjc.Options.getAllPlugins(Options.java:374)
	at com.sun.tools.xjc.Options.parseArgument(Options.java:688)
	at com.sun.tools.xjc.Options.parseArguments(Options.java:812)
	at org.jvnet.mjiip.v_2.OptionsFactory.createOptions(OptionsFactory.java:87)
	at org.jvnet.mjiip.v_2.OptionsFactory.createOptions(OptionsFactory.java:18)
	at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:462)
	at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:311)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlAccessType
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3215)
	at java.base/java.lang.Class.getConstructor0(Class.java:3420)
	at java.base/java.lang.Class.getConstructor(Class.java:2165)
	at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:662)
	at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:659)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
	at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:670)
	... 34 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlAccessType
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	... 42 more

J'ai exploré plusieurs points :

Installation du package javafx :

Le package openjfx est installé.

$ java -version 
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-120.04, mixed mode, sharing)
$ javac -version
javac 14.0.2

Le "niveau de version" de java est lui contraint à java 8 dans les fichiers pom :

Essai de compilation d'un autre projet

https://github.com/eclipse/paho.mqtt.java.git

Ne fonctionne pas non plus, mais avec une erreur très différente :

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.
	at org.jacoco.agent.rt.internal_28bab1d.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
	at org.jacoco.agent.rt.internal_28bab1d.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
	at org.jacoco.agent.rt.internal_28bab1d.PreMain.createRuntime(PreMain.java:55)
	at org.jacoco.agent.rt.internal_28bab1d.PreMain.premain(PreMain.java:47)
	... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
	at java.base/java.lang.Class.getField(Class.java:2013)
	at org.jacoco.agent.rt.internal_28bab1d.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
	... 9 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Aborted (core dumped)

D'autres erreurs similaires suivent.

Essai d'execution du package précompilé

Récupération des jar précompilés.

$ java -jar mqtt-spy-1.0.0.jar 
Erreur : impossible de trouver ou de charger la classe principale pl.baczkowicz.mqttspy.Main
Causé par : java.lang.NoClassDefFoundError: javafx/application/Application

Bon, ici, on peut supposer que la dépendance à javafx n'est pas trouvée.

$ java --module-path=/usr/share/openjfx/lib -jar mqtt-spy-1.0.0.jar
Erreur : impossible de trouver ou de charger la classe principale pl.baczkowicz.mqttspy.Main
Causé par : java.lang.NoClassDefFoundError: javafx/application/Application

Ici, j'ajoute les dépendances sous forme de module pour pouvoir indiquer seulement le répertoire racine des .jar.

Apparement, il manque encore qq chose :

$ java --module-path=/usr/share/openjfx/lib --add-modules javafx.controls -jar mqtt-spy-1.0.0.jar
Exception in Application start method
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at pl.baczkowicz.mqttspy.configuration.MqttConfigurationManager.<init>(MqttConfigurationManager.java:69)
	at pl.baczkowicz.mqttspy.Main.start(Main.java:63)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	... 1 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 11 more
Exception running application pl.baczkowicz.mqttspy.Main

Ici, le module est satisfait, on a ajouté un module path, mais aussi le module à prendre en compte. MAIS, apparement il manque les bibliotèques natives, essayons avec celles du jdk...

$ java -Djava.library.path=/usr/lib/jvm/java-14-openjdk-amd64/lib/ --module-path=/usr/share/openjfx/lib --add-modules javafx.controls -jar mqtt-spy-1.0.0.jar
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 javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
	at java.base/java.lang.Thread.run(Thread.java:832)
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
	at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
	... 5 more

Indique -Djavafx.verbose=true -Dprism.verbose=true pour en savoir plus.

D'après un post stackoverflow, cela peut-être lié au manque d'un paquet gtk :

https://stackoverflow.com/questions/21185156/javafx-on-linux-is-showing-a-graphics-device-initialization-failed-for-es2-s
En particulier, un des commentaires conseille d'installer ceci :

sudo apt-get update; sudo apt-get install libswt-gtk-3-java

Problème, ce package n'existe par sur Ubuntu 20.04.

Par contre :

sudo apt-get install libswt-gtk-4-java

$ java -Dprism.verbose=true -Djava.library.path=/usr/lib/jvm/java-14-openjdk-amd64/lib/ --module-path=/usr/share/openjfx/lib --add-modules javafx.controls -jar mqtt-spy-1.0.0.jar
[...]
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [/usr/lib/jvm/java-14-openjdk-amd64/lib/]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
[...]
$ find /usr/ -iname "prism_es2"
/usr/lib/x86_64-linux-gnu/jni/libprism_es2.so
$ java -Dprism.verbose=true -Djava.library.path=/usr/lib/jvm/java-14-openjdk-amd64/lib/:/usr/lib/x86_64-linux-gnu/jni/ --module-path=/usr/share/openjfx/lib --add-modules javafx.controls -jar mqtt-spy-1.0.0.jar

[...]
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[...]

Problème, la classe java.xml.bind ne fait plus partie du jdk depuis java 9.

*Journal du net : Comment corriger l'erreur java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

... j'abandonne..

Le problème est référencé dans une issue