de-jcup / eclipse-asciidoctor-editor

An eclipse editor for asciidoctor files
https://marketplace.eclipse.org/content/asciidoctor-editor
Other
58 stars 15 forks source link

Failed to load AsciiDoc document - "\x89" from ASCII-8BIT to UTF-8 (UndefinedConversionError) #493

Open stanio opened 1 year ago

stanio commented 1 year ago

I've been trying the following sample.ditaa:

/-----\
|     |
|  A  |
| {o} |
\--+--/
   |
   v
+-----+
|     |
|  B  |
|     |
+--+--+
   |
   v
/-----\
|     |
|  C  |
| {o} |
\-----/

to see if after #453 the output is now SVG, but the preview still appears PNG for me. I've then tried embedding the diagram in a PlantUML file:

@startditaa
/-----\
|     |
|  A  |
| {o} |
\--+--/
   |
   v
+-----+
|     |
|  B  |
|     |
+--+--+
   |
   v
/-----\
|     |
|  C  |
| {o} |
\-----/
@endditaa

but I'm getting a failure seen in the console (and the preview indicating a timeout):

ASP: Processing file:C:\Users\...\sample.puml
Command convert_file failed.Failed:org.jruby.exceptions.EncodingError$UndefinedConversionError: (UndefinedConversionError) asciidoctor: FAILED: C:/Users/.../.eclipse-asciidoctor-editor/tmp/.../4fa7d0a2-0003-331b-be90-da9dcf18f12e_sample.puml: Failed to load AsciiDoc document - "\x89" from ASCII-8BIT to UTF-8

I've looked at the referenced 4fa7d0a2-0003-331b-be90-da9dcf18f12e_sample.puml file but I'm not seeing any non-ASCII characters/bytes:

[plantuml,sample.puml,svg]
----
@startditaa
/-----\
|     |
|  A  |
| {o} |
\--+--/
   |
   v
+-----+
|     |
|  B  |
|     |
+--+--+
   |
   v
/-----\
|     |
|  C  |
| {o} |
\-----/
@endditaa

----

Here are my environment details:

Windows 10

Eclipse IDE for Enterprise Java and Web Developers
Version: 2022-12 (4.26.0)
Build id: 20221201-1913

Asciidoctor Editor 3.1.1

-vm
C:\Users\...\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.6.v20230204-1729\jre\bin\server\jvm.dll

java.runtime.name=OpenJDK Runtime Environment
java.runtime.version=17.0.6+10
stanio commented 1 year ago

I've checked the following options in the Preferences:

and I'm seeing lots of:

java.lang.ClassNotFoundException: org.stathissideris.ascii2image.core.ProcessingOptions
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:375)
    at net.sourceforge.plantuml.ditaa.PSystemDitaa.<init>(PSystemDitaa.java:68)
    at net.sourceforge.plantuml.ditaa.PSystemDitaa.add(PSystemDitaa.java:81)
    at net.sourceforge.plantuml.ditaa.PSystemDitaaFactory.executeLine(PSystemDitaaFactory.java:91)
    at net.sourceforge.plantuml.ditaa.PSystemDitaaFactory.executeLine(PSystemDitaaFactory.java:41)
    at net.sourceforge.plantuml.command.PSystemBasicFactory.createSystem(PSystemBasicFactory.java:82)
    at net.sourceforge.plantuml.PSystemBuilder.createPSystem(PSystemBuilder.java:125)
    at net.sourceforge.plantuml.BlockUml.getDiagram(BlockUml.java:158)
    at org.asciidoctor.diagram.plantuml.PlantUML.generate(PlantUML.java:129)
    at org.asciidoctor.diagram.CommandProcessor.processRequest(CommandProcessor.java:40)
    at org.asciidoctor.diagram.CommandProcessor.processRequest(CommandProcessor.java:19)
    ...

asciidoctor.log