docx4j crashes when handling pictures
Posted: Sat Nov 06, 2010 10:40 am
In my custom XML binding tool - I am getting this stack trace whenever I try to have a picture, floating text box, or anything like that in the document. Do you have any plans to address this?
For Relationship Id=rId10 Source is /word/document.xml, Target is media/image1.png, type: http://schemas.openxmlformats.org/offic ... hips/image (LoadFromZipNG.java, line 342)
05.11.2010 19:14:02 *DEBUG* LoadFromZipNG: resolved uri: word/media/image1.png (LoadFromZipNG.java, line 504)
05.11.2010 19:14:02 *INFO * ContentTypeManager: Looking at extension 'png (ContentTypeManager.java, line 250)
05.11.2010 19:14:02 *INFO * ContentTypeManager: Found content type 'image/png' for /word/media/image1.png (ContentTypeManager.java, line 254)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlgraphics/image/loader/ImageContext
at org.docx4j.openpackaging.contenttype.ContentTypeManager.newPartForContentType(ContentTypeManager.java:337)
at org.docx4j.openpackaging.contenttype.ContentTypeManager.getPart(ContentTypeManager.java:256)
at org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:511)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:420)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:442)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:235)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:188)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:188)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at CustomXmlBinding.main(CustomXmlBinding.java:109)
Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.image.loader.ImageContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 12 more
For Relationship Id=rId10 Source is /word/document.xml, Target is media/image1.png, type: http://schemas.openxmlformats.org/offic ... hips/image (LoadFromZipNG.java, line 342)
05.11.2010 19:14:02 *DEBUG* LoadFromZipNG: resolved uri: word/media/image1.png (LoadFromZipNG.java, line 504)
05.11.2010 19:14:02 *INFO * ContentTypeManager: Looking at extension 'png (ContentTypeManager.java, line 250)
05.11.2010 19:14:02 *INFO * ContentTypeManager: Found content type 'image/png' for /word/media/image1.png (ContentTypeManager.java, line 254)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlgraphics/image/loader/ImageContext
at org.docx4j.openpackaging.contenttype.ContentTypeManager.newPartForContentType(ContentTypeManager.java:337)
at org.docx4j.openpackaging.contenttype.ContentTypeManager.getPart(ContentTypeManager.java:256)
at org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:511)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:420)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:442)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:235)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:188)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:188)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at CustomXmlBinding.main(CustomXmlBinding.java:109)
Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.image.loader.ImageContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 12 more