Hi Jason
I have some problem by processing a word document which already has a customXml/item1.xml
I can open the doc one first time, read all content controls in it, create a new item2.xml with some data and save it.
When I try to open the generated doc with Winword it says "Document cannot be open, because the content has some problems". but i go next and than I can open it.
Then I try to do the same with the generated document, open and process content controls, but this time i have this Exception:
[18:52:51] [DEBUG] [Part] [setPackage]: setPackage called for org.docx4j.openpackaging.parts.relationships.RelationshipsPart
[18:52:51] [DEBUG] [LoadFromZipNG] [addPartsFromRelationships]:
For Relationship Id=rId1 Source is /customXml/item1.xml, Target is itemProps1.xml, type: http://schemas.openxmlformats.org/offic ... omXmlProps
[18:52:51] [DEBUG] [LoadFromZipNG] [getRawPart]: resolved uri: customXml/itemProps1.xml
java.io.IOException: part 'customXml/itemProps1.xml' not found
at org.docx4j.openpackaging.io.LoadFromZipNG.getInputStreamFromZippedPart(LoadFromZipNG.java:308)
at org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:513)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:427)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:449)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:449)
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:350)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:243)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:193)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:225)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:177)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:172)
at LoadFoo.loadFoo(LoadFoo.java:69)
at LoadFoo.main(LoadFoo.java:58)
org.docx4j.openpackaging.exceptions.Docx4JException: Failed to add parts from relationships
at org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:352)
Do you have any idea why or if I'm doing something wrong?
in attach you have the doc and the program with which i test it.
thanks
Adrian