Giter VIP home page Giter VIP logo

Comments (5)

angelozerr avatar angelozerr commented on June 3, 2024

It's a problem with POI, please post your question to POI forum.

from xdocreport.

mohamnag avatar mohamnag commented on June 3, 2024

looking at the stack trace of the exception, it seems more to me that it is an undefined dependency of package org.apache.poi.xwpf.converter.pdf which is one of the XDocReport packages not POI:

java.lang.NoClassDefFoundError: org/apache/poi/xwpf/usermodel/IRunBody
    at org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:55)
    at org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:38)
    at org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45)
    at fr.opensagres.xdocreport.converter.docx.poi.itext.XWPF2PDFViaITextConverter.convert(XWPF2PDFViaITextConverter.java:67)
    at fr.opensagres.xdocreport.document.AbstractXDocReport.convert(AbstractXDocReport.java:713)
    at XdocVelocityMap.main(XdocVelocityMap.java:48)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xwpf.usermodel.IRunBody
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more

unfortunately XDocReport maven packages miss lots of such dependency definitions.

from xdocreport.

mohamnag avatar mohamnag commented on June 3, 2024

as I suspected the problem was wrong dependency, the docs say poi-ooxml v 3.9 but the code needs at least v 3.10.1, I used 3.11 successfully. so I would also update the docs

from xdocreport.

angelozerr avatar angelozerr commented on June 3, 2024

Doc is out of date for the version. I think it's a bad idea to set the version in the doc, because we must synch the doc with maven pom. I think it's better to set a link to the pom to know the version of POI

from xdocreport.

mohamnag avatar mohamnag commented on June 3, 2024

Actually a proper maven definition includes all the dependencies a package needs, so this (and all other packages needed) should have been a defined dependency of one of XDocReport packages which implements main Docx to PDF conversion.

from xdocreport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.