Skip to content

Exception while creating PDF file from Asciidoctor #7399

@kkgv

Description

@kkgv

I am getting exception while creating pdf file from ascii doc files using the following libraries in Spring boot application.

org.asciidoctor:asciidoctorj:1.6.0-alpha.3
org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11
org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6

I found similar issues reported earlier tried by setting class loader but no success.

The exception shown is

org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- asciidoctor
         at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:944) ~[jruby-core-9.1.2.0.jar!/:?]
         at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55) ~[?:?]
         at RUBY.<top>(<script>:9) ~[?:?]

My code looks like this. The path is the directory where ascii doc are stored.

    final Asciidoctor asciidoctor = create();
    asciidoctor.renderDirectory(new AsciiDocDirectoryWalker(path), options().backend("pdf").get());
    asciidoctor.shutdown();

This issue raised with project 'asciidoctorj ' (asciidoctor/asciidoctorj#532). But the response I got from them is it is Spring boot class loader related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions