asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
444 stars 109 forks source link

(LoadError) no such file to load -- asciidoctor-diagram (Use after fat Jar deployment) #471

Closed Ghuu420 closed 1 month ago

Ghuu420 commented 1 month ago

Ive been working on a Spring boot project lately that uses the asciidoctor and keep having this problem so hopefully someone is familiar with it and could say something about it ..

Its a basic projekt to creates different types of reports. Locally using a IDE (ECLIPSE) everything works fine but after the deployment , some problems start to happen. I am using java 17 and Apach Maven 3.9.1 locally .

The project is built into a fat executable Jar which is used for deployment (Linux Ubuntu (Java 17 too)) using these dependencies and build plugins

org.springframework.boot spring-boot-starter-web org.apache.poi poi-ooxml 3.17 org.asciidoctor asciidoctorj 3.0.0 compile org.asciidoctor asciidoctorj-pdf 2.3.18 compile org.asciidoctor asciidoctorj-diagram 2.3.1

build_screen

I double checked after the successful build, that the asciidoctor-diagramm is unpacked and existant (at xxx1.0.0.jar\BOOT-INF\classes\gems\asciidoctor-diagram-2.3.1). After the deployment , calling an Api to generate a pdf report , I keep getting this error :

[org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.jruby.exceptions.LoadError: (MissingSpecError) Gem::MissingSpecError] with root cause : org.jruby.exceptions.LoadError: (LoadError) no such file to load -- asciidoctor-diagram at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1184) at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85) at RUBY.

( Githubissues.
  • Githubissues is a development platform for aggregating issues.