You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/01/05 01:55:07 UTC

DO NOT REPLY [Bug 46472] New: NPE in HPSFPropertiesExtractor.getDocumentSummaryInformationText gives NPE

https://issues.apache.org/bugzilla/show_bug.cgi?id=46472

           Summary: NPE in
                    HPSFPropertiesExtractor.getDocumentSummaryInformationTex
                    t gives NPE
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: HPFS
        AssignedTo: dev@poi.apache.org
        ReportedBy: adb@teamware.com


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();
...


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46472] NPE in HPSFPropertiesExtractor.getDocumentSummaryInformationText gives NPE

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46472


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Nick Burch <ni...@torchbox.com>  2009-01-06 10:59:41 PST ---
Fixed in svn


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46472] NPE in HPSFPropertiesExtractor.getDocumentSummaryInformationText gives NPE

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46472





--- Comment #2 from Josh Micich <jo...@gildedtree.com>  2009-01-06 11:55:45 PST ---
svn r732058 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=732058 )

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org