Hi,
I'm using a multi-threaded process to create PDF documents from word templates. After a few successful conversions, the Docx.toFO call gives the below error. Kindly help me through this.
org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:96)
at org.docx4j.Docx4J.toFO(Docx4J.java:467)
at com.templateMerger.TemplateMergerUtil.saveToPDF(TemplateMergerUtil.java:232)
at com.templateMerger.TemplateMergerUtil.mergeToTemplate(TemplateMergerUtil.java:200)
at com.templateMerger.TemplateProcessor.run(TemplateProcessor.java:213)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:896)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:735)
Caused by: java.lang.NullPointerException
at java.util.AbstractList$SimpleListIterator.hasNext(Unknown Source)
at org.apache.fop.fonts.truetype.TTFFile.readKerning(TTFFile.java:1678)
at org.apache.fop.fonts.truetype.TTFFile.readFont(TTFFile.java:730)
at org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:105)
at org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:91)
at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:205)
at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:154)
at org.apache.fop.fonts.LazyFont.load(LazyFont.java:151)
at org.apache.fop.fonts.LazyFont.hasChar(LazyFont.java:210)
at org.apache.fop.fonts.Font.hasChar(Font.java:261)
at ...