I've sean threads on these two subject, but concerning older version of docx4j
I'm having two dependency issues : - one with log4j and sl4j where I can't find a suitable combination of versions that allow the Logger.setLevel() call that docx makes when initializing it's logger. This is not a blocker as it only fails in tests. - one with batik with the following stack 2012-04-06 15:48:17,152 [WARN] - - Batik not in class path java.lang.NoClassDefFoundError: org/apache/batik/bridge/UserAgent at org.apache.fop.image.loader.batik.PreloaderSVG.preloadImage(PreloaderSVG.java:69) ~[fop-patched-0.95.756436.jar:na] at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:165) [xmlgraphics-commons-1.3.757686.jar:1.4svn] at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:96) [xmlgraphics-commons-1.3.757686.jar:1.4svn] at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:112) [xmlgraphics-commons-1.3.757686.jar:1.4svn] at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.getImageInfo(BinaryPartAbstractImage.java:476) [docx4j-2.2.2.jar:na] at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.createImagePart(BinaryPartAbstractImage.java:188) [docx4j-2.2.2.jar:na] at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.createImagePart(BinaryPartAbstractImage.java:152) [docx4j-2.2.2.jar:na] It is only a WARN, but the image is not created in a way or another ...
Has anyone met one of theses issues, and has a fix at hand ?
Pierre wrote:I was surprised to find that a catch of NoClassDefFound was made a few lines below while using the setLog method of another logger, but not for the root Logger. Why is it so ?
As per the comment, in case the FOP jar is not available. If FOP is not available, some of the import statements in org.docx4j.convert.out.pdf.viaXSLFO.Conversion can't be honoured, with the result that the class won't be available/found.