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 2015/05/28 01:44:38 UTC

[Bug 57961] New: NPE in PoiTextExtractor when closed

https://bz.apache.org/bugzilla/show_bug.cgi?id=57961

            Bug ID: 57961
           Summary: NPE in PoiTextExtractor when closed
           Product: POI
           Version: 3.10-FINAL
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: rimovm@centercomp.com

Code:

File f = /* ... */
try (POITextExtractor extractor = ExtractorFactory.createExtractor(file);) {
      return extractor.getText();
}

Which can result in:

Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail
to save: an error occurs while saving the package : null
    at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:500)
    at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1417)
    at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1404)
    at org.apache.poi.openxml4j.opc.ZipPackage.closeImpl(ZipPackage.java:349)
    at org.apache.poi.openxml4j.opc.OPCPackage.close(OPCPackage.java:420)
    at org.apache.poi.POIXMLTextExtractor.close(POIXMLTextExtractor.java:87)
    at com.gaggle.message.index.poi.PoiIndexer$1.call(PoiIndexer.java:94)
    at com.gaggle.message.index.poi.PoiIndexer$1.call(PoiIndexer.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at
org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller.marshall(ZipPackagePropertiesMarshaller.java:46)
    at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:444)



The file being processed was a word document and extractor.getText() DID return
data.  Unfortunately, due to privacy concerns with a client I can't release the
actual document.

Thanks.

-- 
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


[Bug 57961] NPE in PoiTextExtractor when closed

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Please try with the latest version 3.12 as there have been a few fixes in that
area and thus the problem might be already fixed there now. Especially r1662971
looks like it should be able to fix your issue.

-- 
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


[Bug 57961] NPE in PoiTextExtractor when closed

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

Dominik Stadler <do...@gmx.at> changed:

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

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
No update on this one so I assume it was fixed in 3.12. Please reopen with more
information if this is still an issue for you.

-- 
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