asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.86k stars 297 forks source link

Cannot generate PDF files with FOP, "The first argument to the non-static Java function 'insertCallouts' is not a valid object reference." #601

Open masa300V opened 10 months ago

masa300V commented 10 months ago

Hi! When I select the FOP, I found my 1.8.5 AsciidocFX (on Windows 10) cannot generate a PDF. I tried my own document AND the AsciidocFX "Cheatsheet.adoc", and both fails. Here's my ERROR message.

ERROR => Problem occured while converting to PDF javax.xml.transform.TransformerConfigurationException: The first argument to the non-static Java function 'insertCallouts' is not a valid object reference. at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1079) at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:834) at com.kodedu.service.convert.pdf.FopPdfBookConverter.lambda$convert$0(FopPdfBookConverter.java:96) at com.kodedu.service.convert.docbook.DocBookConverter.lambda$convert$0(DocBookConverter.java:96) at com.kodedu.service.impl.ThreadServiceImpl$1.call(ThreadServiceImpl.java:53) at javafx.graphics@20.0.1/javafx.concurrent.Task$TaskCallable.call(Task.java:1426) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) at java.base/java.util.concurrent.ThreadPerTaskExecutor$ThreadBoundFuture.run(ThreadPerTaskExecutor.java:352) at java.base/java.lang.VirtualThread.run(VirtualThread.java:305) at java.base/java.lang.VirtualThread$VThreadContinuation.lambda$new$0(VirtualThread.java:177) at java.base/jdk.internal.vm.Continuation.enter0(Continuation.java:327) at java.base/jdk.internal.vm.Continuation.enter(Continuation.java:320)


As reported by lopsotronic, I hit the same error and I blindly ignored to see above error.

In my "AsciidocFX.vmoptions", I added these 3 options to avoid recent safety checks on Java.

-Djdk.xml.xpathExprGrpLimit=0 -Djdk.xml.xpathExprOpLimit=0 -Djdk.xml.xpathTotalOpLimit=0

rahmanusta commented 8 months ago

Fixed https://github.com/asciidocfx/AsciidocFX/releases/tag/v1.8.6