eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
114 stars 39 forks source link

./gradlew build -> Task :specification:asciidoctorDocbook FAILED #415

Open surfskidude opened 1 year ago

surfskidude commented 1 year ago

What do you want to know?

I am following the instructions: https://www.hivemq.com/blog/starter-guide-sparkplug-3-0-certification-technology-compatibility-kit-tck-industry-40/

I get the following Java error:

./gradlew build Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

Task :specification:asciidoctorDocbook WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/wini/.gradle/wrapper/dists/gradle-6.8-bin/1jblhjyydfkclfzx1agp92nyl/gradle-6.8/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass 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 Exception in thread "main" org.asciidoctor.gradle.remote.AsciidoctorRemoteExecutionException: Error running Asciidoctor whilst attempting to process /mnt/c/tmp/sparkplug/specification/build/spec/sparkplug_spec.adoc using backend docbook at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(AsciidoctorJavaExec.groovy:91) 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:566) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:421) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2330) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2315) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2368) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.convertFiles(AsciidoctorJavaExec.groovy:82) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.access$1(AsciidoctorJavaExec.groovy) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.doCall(AsciidoctorJavaExec.groovy:73) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.call(AsciidoctorJavaExec.groovy) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2330) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2315) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2356) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.run(AsciidoctorJavaExec.groovy:68) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.main(AsciidoctorJavaExec.groovy:49) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so at java.lang.ClassLoader.loadLibrary(java/lang/ClassLoader.java:2633) at java.lang.Runtime.load0(java/lang/Runtime.java:768) at java.lang.System.load(java/lang/System.java:1837) at java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.lang.ClassLoader$NativeLibrary.load(java/lang/ClassLoader.java:2445) at java.lang.ClassLoader$NativeLibrary.loadLibrary(java/lang/ClassLoader.java:2501) at java.lang.ClassLoader.loadLibrary0(java/lang/ClassLoader.java:2700) at java.lang.ClassLoader.loadLibrary(java/lang/ClassLoader.java:2651) at java.lang.Runtime.loadLibrary0(java/lang/Runtime.java:830) at java.lang.System.loadLibrary(java/lang/System.java:1873) at java.awt.image.ColorModel$1.run(java/awt/image/ColorModel.java:209) at java.awt.image.ColorModel$1.run(java/awt/image/ColorModel.java:207) at java.security.AccessController.doPrivileged(Native Method) at java.awt.image.ColorModel.loadLibraries(java/awt/image/ColorModel.java:206) at java.awt.image.ColorModel.(java/awt/image/ColorModel.java:219) at java.awt.image.BufferedImage.(java/awt/image/BufferedImage.java:286) at net.sourceforge.plantuml.FileFormat.(net/sourceforge/plantuml/FileFormat.java:85) at org.asciidoctor.diagram.plantuml.PlantUML.generate(org/asciidoctor/diagram/plantuml/PlantUML.java:78) at org.asciidoctor.diagram.CommandProcessor.processRequest(org/asciidoctor/diagram/CommandProcessor.java:40) at org.asciidoctor.diagram.CommandProcessor.processRequest(org/asciidoctor/diagram/CommandProcessor.java:19) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:566) at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:456) at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:317) at RUBY.send_request(uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/util/java_jruby.rb:24) at RUBY.convert(uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/plantuml/converter.rb:60) at RUBY.create_image_block(uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/diagram_processor.rb:162) at RUBY.process(uri:classloader:/gems/asciidoctor-diagram-2.0.0/lib/asciidoctor-diagram/diagram_processor.rb:84) at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:132) at org.jruby.RubyMethod$INVOKER$i$call.call(org/jruby/RubyMethod$INVOKER$i$call.gen) at RUBY.next_block(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:645) at RUBY.next_section(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:379) at RUBY.next_section(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:364) at RUBY.next_section(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:364) at RUBY.next_section(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:364) at RUBY.parse(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:97) at RUBY.parse(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:549) at RUBY.load(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/load.rb:83) at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:78) at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183) at org.jruby.RubyIO.ensureYieldClose(org/jruby/RubyIO.java:1166) at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1160) at org.jruby.RubyIO$INVOKER$s$0$0$open.call(org/jruby/RubyIO$INVOKER$s$0$0$open.gen) at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:788) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:377) at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(org/asciidoctor/jruby/internal/JRubyAsciidoctor.java:390) at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(org/asciidoctor/jruby/internal/JRubyAsciidoctor.java:366) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy:87) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:566) at org.codehaus.groovy.reflection.CachedMethod.invoke(org/codehaus/groovy/reflection/CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(groovy/lang/MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(groovy/lang/MetaClassImpl.java:1041) at groovy.lang.Closure.call(groovy/lang/Closure.java:405) at groovy.lang.Closure.call(groovy/lang/Closure.java:421) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2330) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2315) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2368) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.convertFiles(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy:82) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.access$1(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.doCall(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy:73) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.call(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2330) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2315) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(org/codehaus/groovy/runtime/DefaultGroovyMethods.java:2356) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.run(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy:68) at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.main(org/asciidoctor/gradle/remote/AsciidoctorJavaExec.groovy:49)

Task :specification:asciidoctorDocbook FAILED

FAILURE: Build failed with an exception.

Is this related to a Sparkplug Listing request? If so, link the issue from https://github.com/eclipse-sparkplug/sparkplug.listings here.

No response

Version

3.0.0 (Default)

Accept EFTL Terms

wes-johnson commented 1 year ago

Looks like the root issue is here: Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so

Are you building with the JDK or just the JVM? You will need the full JDK to build (not a headless version)

surfskidude commented 1 year ago

I believe I have the full JDK: $ java -version openjdk version "11.0.17" 2022-10-18 OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu222.04) OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu222.04, mixed mode, sharing)

wes-johnson commented 1 year ago

@surfskidude - Can you try building with this JDK? https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc. This is what I've been using recently without any issues.

surfskidude commented 1 year ago

@surfskidude - Can you try building with this JDK? https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc. This is what I've been using recently without any issues.

Thanks, I will check it out when time permits.

bryce-nakatani commented 1 year ago

Check to see if you have graphviz installed too; "sudo apt install graphviz".

On Tue, Apr 4, 2023 at 7:34 AM surfskidude @.***> wrote:

@surfskidude https://github.com/surfskidude - Can you try building with this JDK? https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc. This is what I've been using recently without any issues.

Thanks, I will check it out when time permits.

— Reply to this email directly, view it on GitHub https://github.com/eclipse-sparkplug/sparkplug/issues/415#issuecomment-1496084251, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF6AZRLZ32SBJAS663ZDR3W7QWRBANCNFSM6AAAAAATDR4LEY . You are receiving this because you are subscribed to this thread.Message ID: @.***>