Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred when creating an instance of 'asciidoctor' while running the program on Azure Service[Web App]. #1263

Closed
RunningSine opened this issue Feb 23, 2024 · 2 comments
Labels

Comments

@RunningSine
Copy link

I developed a simple API application using Spring Boot, which handles AsciiDoc formatted content and converts it to HTML format. During local debugging, I can successfully access the API using Postman and receive the correct results. However, when I deploy this application as a *.jar file to Azure Service[Web App] and call the remote program using Postman, I encounter the following error:
org.jruby.exceptions.LoadError: (LoadError) no such file to load -- asciidoctor
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1071)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:85)
at RUBY.

(<script>:12)
The Azure Service[Web App]'s detail as below:
Publish:code
Runtime stack:Java 17
Java web server stack:Java SE(Embedded Web Server)
Operating System:Windows
I have added the dependency in a Maven build file (pom.xml).How can I resolve this issue?

@abelsromero
Copy link
Member

It's a known "issue" related to how SpringBoot handles classloading https://docs.asciidoctor.org/asciidoctorj/latest/guides/run-with-springboot/.

I have a full example in https://github.com/abelsromero/asciiboot. Does not handle things efficiently with multipart, but has de appriate Gradle configuration.

@RunningSine
Copy link
Author

Thank you very much for your reminder. Following your prompt, the issue has been resolved satisfactorily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants