Hello-- We have a process that takes a Word document (docx) and merges content into it, at locations in the document indicated by the document's creator. At the moment there is a small set of authors using only Word 2008 (for Mac), but this is likely to soon become a larger group of authors using Word for Windows (2007+) as well.
We've discovered that Word can produce documents that cause NullPointerExceptions when loaded into POI. Two cases appear to be bugs (not handling objects that could be null), but one case clearly is not: "OPC Compliance error [M4.1]: there is more than one core properties relationship in the package !". Word can happily read and write files that cause this error in POI. My concerns are these: 1) How do I tell my authors to avoid this? In other words, what are they doing in Word to create multiple core properties? 2) Knowing that Word can cheerfully read and write documents that POI considers invalid, but needing to support my users, should I modify the POI code to relax this particular error checking? In this case I could just use the first core properties document part that is encountered and ignore any others. I guess this is a letter-of-the-law versus intent-of-the-law situation. It's not a perfect world out there; how best to handle it? Thanks for any suggestions! Gregg
