Currently have started with docxj, but I have a lot problem with a simple example.
In my example I call
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
wordMLPackage.save(new java.io.File("hworld.docx") );
An the save throw the exception:
org.docx4j.openpackaging.exceptions.Docx4JException: Error marshalling Content_Types
at org.docx4j.openpackaging.io3.stores.ZipPartStore.saveContentTypes(ZipPartStore.java:217)
at org.docx4j.openpackaging.io3.Save.save(Save.java:176)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:604)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:550)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:523)
at Main16.main(Main16.java:16)
Caused by: java.lang.NullPointerException
at org.docx4j.openpackaging.contenttype.ContentTypeManager.marshal(ContentTypeManager.java:794)
at org.docx4j.openpackaging.io3.stores.ZipPartStore.saveContentTypes(ZipPartStore.java:213)
... 5 more
org.docx4j.openpackaging.exceptions.Docx4JException: Error marshalling Content_Types
at org.docx4j.openpackaging.io3.stores.ZipPartStore.saveContentTypes(ZipPartStore.java:217)
at org.docx4j.openpackaging.io3.Save.save(Save.java:176)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:604)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:550)
at org.docx4j.openpackaging.packages.OpcPackage.save(OpcPackage.java:523)
at Main16.main(Main16.java:16) ...