AsciidocFX icon indicating copy to clipboard operation
AsciidocFX copied to clipboard

Referencing include content by URI is not worked

Open cradle81 opened this issue 2 years ago • 2 comments
trafficstars

when I upgrade to 1.8.6 from 1.8.5 A referencing include content by URI is not worked the exception is as follows

ERROR => Problem occured while rendering content
java.nio.file.InvalidPathException: Illegal char <:> at index 5: https://xxx.bbb.co.kr/api/a.adoc	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
	at java.base/java.nio.file.Path.resolve(Path.java:516)
	at com.kodedu.service.extension.processor.XrefIncludeProcessor.resolveTargetPath(XrefIncludeProcessor.java:46)
	at com.kodedu.service.extension.processor.XrefIncludeProcessor.process(XrefIncludeProcessor.java:30)
	at org.asciidoctor.jruby.extension.processorproxies.IncludeProcessorProxy.process(IncludeProcessorProxy.java:109)
	at org.asciidoctor.jruby.extension.processorproxies.IncludeProcessorProxy$INVOKER$i$1$0$process.call(IncludeProcessorProxy$INVOKER$i$1$0$process.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:847)
	at org.jruby.RubyMethod.call(RubyMethod.java:144)
	at org.jruby.RubyMethod$INVOKER$i$call.call(RubyMethod$INVOKER$i$call.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:452)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:92)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:561)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:88)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:228)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:516)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:293)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:328)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:82)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:220)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:242)
	at org.jruby.runtime.callsite.CachingCallSite.fcall(CachingCallSite.java:248)
	at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.reader.invokeOther7:process_line(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/reader.rb:136)
	at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.reader.RUBY$method$peek_line$0(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/reader.rb:136)
	at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112)
	at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1318)
	at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.reader.invokeSuper0:peek_line(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/reader.rb:657)
	at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.reader.RUBY$method$peek_line$0(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/reader.rb:657)
	at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)
	at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:149)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:148)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:194)
	at org.jruby.RubyClass.finvoke(RubyClass.java:792)
	at org.jruby.runtime.Helpers.invoke(Helpers.java:660)
	at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:365)
	at org.asciidoctor.jruby.internal.RubyObjectWrapper.getRubyProperty(RubyObjectWrapper.java:134)
	at org.asciidoctor.jruby.internal.RubyObjectWrapper.getList(RubyObjectWrapper.java:99)
	at org.asciidoctor.jruby.extension.internal.ReaderImpl.readLines(ReaderImpl.java:66)
	at com.kodedu.service.extension.processor.ExtensionPreprocessor.process(ExtensionPreprocessor.java:23)
	at org.asciidoctor.jruby.extension.processorproxies.PreprocessorProxy.process(PreprocessorProxy.java:94)
	at org.asciidoctor.jruby.extension.processorproxies.PreprocessorProxy$INVOKER$i$2$0$process.call(PreprocessorProxy$INVOKER$i$2$0$process.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodTwoOrN.call(JavaMethod.java:1036)
	at org.jruby.RubyMethod.call(RubyMethod.java:130)
	at org.jruby.RubyMethod$INVOKER$i$call.call(RubyMethod$INVOKER$i$call.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrTwoOrNBlock.call(JavaMethod.java:377)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:291)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:328)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
	at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
	at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170)
	at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
	at org.jruby.runtime.Block.yield(Block.java:188)
	at org.jruby.RubyArray.each(RubyArray.java:1987)
	at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:561)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:90)
	at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:103)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:558)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:88)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:228)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:291)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:328)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:194)
	at org.jruby.RubyClass.finvoke(RubyClass.java:792)
	at org.jruby.runtime.Helpers.invoke(Helpers.java:660)
	at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:369)
	at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:321)
	at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:346)
	at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:341)
	at com.kodedu.engine.AsciidocAsciidoctorjConverter.convert(AsciidocAsciidoctorjConverter.java:140)
	at com.kodedu.engine.AsciidocAsciidoctorjConverter.convert(AsciidocAsciidoctorjConverter.java:105)
	at com.kodedu.controller.ApplicationController.renderText(ApplicationController.java:2449)
	at com.kodedu.controller.ApplicationController.renderInRow(ApplicationController.java:2417)
	at com.kodedu.controller.ApplicationController.lambda$textListener$205(ApplicationController.java:2581)
	at com.kodedu.service.impl.ThreadServiceImpl$1.call(ThreadServiceImpl.java:53)
	at javafx.graphics@21/javafx.concurrent.Task$TaskCallable.call(Task.java:1399)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:311)


Even though it is a uri, it seems to be judged to be in the Windows file directory. The https or http scheme is attached, but the problem seems to be recognizing it as a file.

cradle81 avatar Nov 20 '23 12:11 cradle81

It is in progress to resolve that issue, thanks for reporting

rahmanusta avatar Dec 21 '23 09:12 rahmanusta

Hi, you can see the fix in https://github.com/asciidocfx/AsciidocFX/releases/tag/v1.8.7

rahmanusta avatar Jan 17 '24 09:01 rahmanusta