Login  Register

Re: Exception in AsciiDoctorJ with pdf

Posted by mojavelinux on Jan 20, 2020; 7:12am
URL: https://discuss.asciidoctor.org/Exception-in-AsciiDoctorJ-with-pdf-tp7498p7503.html

There are two reasons for this. First, it's likely that your document header is not properly defined. And the old version of Asciidoctor PDF that you're using would crash when that happened.

The latest version of Asciidoctor PDF is 1.0.0.rc.2. If you upgrade, it will fix the crash. If you fix your document header, it will remove the condition that caused that crash.

Best,

-Dan

On Sun, Jan 19, 2020 at 11:07 PM Conrad [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi, this command worked already. Yesterday, I wanted to use this command again but get an exception.

AsciiDoctorJ -b pdf 0_Documentation_de.adoc

I installed AsciiDoctorJ via Chocolatey.

The command works with the zip-installation.

Could somebody tell me the reason?

Conrad

Jan 20, 2020 7:01:15 AM org.asciidoctor.jruby.internal.JRubyAsciidoctor convertFile
SEVERE: (NoMethodError) undefined method `highlight?' for nil:NilClass
Exception in thread "main" org.asciidoctor.jruby.internal.AsciidoctorCoreException: org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `highlight?' for nil:NilClass
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:391)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:405)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:400)
        at org.asciidoctor.jruby.cli.AsciidoctorInvoker.renderInput(AsciidoctorInvoker.java:169)
        at org.asciidoctor.jruby.cli.AsciidoctorInvoker.invoke(AsciidoctorInvoker.java:72)
        at org.asciidoctor.jruby.cli.AsciidoctorInvoker.main(AsciidoctorInvoker.java:229)
Caused by: org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `highlight?' for nil:NilClass
        at RUBY.convert_listing_or_literal(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:1441)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:127)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:75)
        at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2577)
        at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84)
        at RUBY.convert_content_for_block(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:143)
        at RUBY.convert_section(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:498)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:127)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:75)
        at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2577)
        at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/abstract_block.rb:84)
        at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:1020)
        at RUBY.convert_content_for_block(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:143)
        at RUBY.convert_document(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:268)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.18/lib/asciidoctor-pdf/converter.rb:127)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:951)
        at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:118)
        at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1157)
        at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/convert.rb:183)


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Exception-in-AsciiDoctorJ-with-pdf-tp7498.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux