Page 1 of 1

Create pdf NoClassDefFoundError

PostPosted: Tue Nov 13, 2012 9:16 pm
by Guillaume777
Hi,
I am trying to run the create pdf sample but constantly get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.convert.out.pdf.viaXSLFO.Conversion

My guess is that I am missing a dependency but I can't find which one, my librairy contains:
xmlgraphics-commons-1.4
xercesImpl
xalan-2.7.1
poi-3.8
log4j-1.2.17
jaxb-xslfo-1.0.1
fop-1.0
docx4j-2.8.1
commons-logging-1.1.1
commons-io-1.3.1
avalon-framework-impl-4.3.1
avalon-framework-api-4.3.1

Any help much appreciated.
Guillaume

Re: Create pdf NoClassDefFoundError

PostPosted: Tue Nov 20, 2012 2:30 pm
by jason
For docx4j 2.8.1, please compare your libraries with those in http://www.docx4java.org/docx4j/docx4j-2.8.1/

Try adding jaxb-svg11-1.0.2.jar, jaxb-xmldsig-core-1.0.0.jar, xml-apis-1.3.04.jar

Failing that, can you get more info out of your environment?