• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Apache POI/opensagres - unable to view PDF content and download PDF

Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are migrating Oracle DB version from 11 to 19. While testing the application, we are unable to view the PDF content and download the PDF. We are using Java version 8, Spring-MVC 5 framework for the application development and the code is running on Tomcat version 9.

We are able to view the content and download the PDF when the application running on Oracle  DB version 11 but not on version 19.

This issue happening only for the PDF view and not on the Doc, Xls file extensions.

I also referred the below links but it did not work.

Please help.


Error Details
Systemld Unknown; Line #1; Column #17907; The entity name must immediately follow the '& in the entity reference.
fr.opensagres.xdocreport.converter.XDocConverterException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeloader
at fr.opensagres.xdocreport.document.AbstractXocReport.convert(AbstractDocReport.java:745)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.ClibAopProxy$CglibMethodInvocation.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(AsyncExecutionInterceptor.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(XMPFDocument.java:161)
at org.apache.pol.ooxml.PODMLDocument.load(POIXMLDocument.java:169)
at org.apache.poi.pf.usermodel.XWPFDocument.<init>(XWPFDocument.java:126)
at fr.opensagres.xdocreport.comverter.docx.poi.itext.XWPF2PDFVialTextConverter.convert(XWPF2PDFVialTextConverter.java:66)
at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:710)

Posts: 7488
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what the links you posted have to do with the problem. The relevant SO topic seems to be https://stackoverflow.com/questions/13284565/java-lang-noclassdeffounderror-could-not-initialize-class-org-apache-poi-poixml, so make sure that's not the problem.

The build file has some inconsistencies that probably need to be fixed. For example, it uses POI 5 with the POI 4 XMl Schema code - likely not a good idea. It also imports ooxml-schemas 1.4, which looks like an outdated version of poi-ooxml-schemas 4.1.2, which is also imported - definitely not a good idea.
    Bookmark Topic Watch Topic
  • New Topic