I am using docx4j 2.7.1 on a Linux x86_64. environment running weblogic 10.3. The java runtime is 1.6.0_25.
When loading the docx document with embedded image, I saw the following exception in the log.
java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.openpackaging.parts.WordprocessingML.ImagePngPart at org.docx4j.openpackaging.contenttype.ContentTypeManager.newPartForContentType(ContentTypeManager.java:365) at org.docx4j.openpackaging.contenttype.ContentTypeManager.getPart(ContentTypeManager.java:267) at org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:519) at
I saw a similar question ask here:
I have also confirmed that the classpath has the required jars (including xml-graphics-commons-1.4.jar) for docx4j.
I don't think the jars are missing from the classpath. When I removed the image from the docx document, it loads without issue.
Please give me some hint on how this can be resolved? I need this to work for a project which is due for release candidate tomorrow.