While downloading the PDF file from my UI, I am getting below error message.
I am using SpringMVC 5.x, Tomcat 9.x and Java 8 for the development.
Dependencies
fr.opensagres.xdocreport version 2.0.2
org.apache.poi version 4.0.1
Error details
[Abstract TemplateEngine.java:Executor-1:128] End template engine id-Velocity for the entry-word/endnotes.xml done with 4(ms).
[AbstractXDocReport.java:Executor-1:725] End convert report with error done with 145(ms).
fr.opensagres.xdocreport.converter.XDocConverterException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml. POIXML TypeLoader
at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:745)
at com.ltm.docs.execute(PdfDownload.java:128)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxySCglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecution Interceptor-java:115)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader
at org.apache.pol.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:161)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXML Document.java:169)
at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:126)
at fr.opensagres.xdocreport.converter.docx.poi.itext.XWPF2PDFViaITextConverter.convert(XWPF2PDFViaITextConverter.java:66)
at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:710)
... 14 more
[AbstractPlatformTransaction Manager.java:Executor-1:743] Initiating transaction commit
Code Snippet
getting error here - report.convert(context, options, fileOutput);