0

I have a issue with asciidoctor. My application is working when I am running it outside the docker container. When I am using maven build to generate the jar and run it inside the docker container, it shows :

org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- 
asciidoctor
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:961)
    at RUBY.require(uri:classloader:/META- 
INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
    at RUBY.<main>(<script>:12)

asciidoctorj: 1.5.6
asciidoctor-pdf: 1.5.0-alpha.15
org.jruby:jruby-complete: 1.7.26
dockerfile: openjdk:8u111-jdk
intellij

please help if anyone knows the way to solve the issue, thx!

lin
  • 167
  • 1
  • 3
  • 13
  • How are you creating the jar? It sounds like it's missing a dependency. Either create a fat jar or add the dependency to the Java runtime classpath in the Docker container. – Sam Malayek Nov 14 '18 at 00:05
  • I am using maven build: clean compile package to generate the jar – lin Nov 14 '18 at 00:08
  • https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven – Sam Malayek Nov 14 '18 at 00:11
  • I try to build a fat jar with the last post: com.jolira onejar-maven-plugin 1.4.4 . I run it in the docker container again, it first shows java out of memory issue, so I change the java_options from Xmx256 to Xmx1024, then it shows: Exception in thread "main" java.lang.reflect.InvocationTargetException , Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Unable to determine code source archive from file – lin Nov 14 '18 at 00:51

0 Answers0