java.lang.NullPointerException at org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor.getDocumentSummaryInformationText(HPSFPropertiesExtractor.java:59) at org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor.getText(HPSFPropertiesExtractor.java:128) It's caused by the following when trying to extract meta data properties from a Word document POITextExtractor extractor = ExtractorFactory.createExtractor(new ByteArrayInputStream(raw)); POITextExtractor mdExtractor = extractor.getMetadataTextExtractor(); if (mdExtractor != null) { String md = mdExtractor.getText(); System.out.println("MD=:" + md); } and is caused because my Word document would not appear to have custom properties, therefore the getCustomProperties() method returns null in the following... public String getDocumentSummaryInformationText() { ... // Now custom ones CustomProperties cps = dsi.getCustomProperties(); Iterator keys = cps.keySet().iterator(); ...
Fixed in svn
svn r732058