poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52449] New: NullPointerException in org.apache.poi.xwpf.usermodel.XWPFStyles.commit()
Date Wed, 11 Jan 2012 09:28:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52449

             Bug #: 52449
           Summary: NullPointerException in
                    org.apache.poi.xwpf.usermodel.XWPFStyles.commit()
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: nsh@trifork.com
    Classification: Unclassified


Created attachment 28137
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28137
Example word document

This has been observed in version 3.8-beta5

NullPointerException when reading and subsequently writing attached document.

java.lang.NullPointerException
    at org.apache.poi.xwpf.usermodel.XWPFStyles.commit(XWPFStyles.java:104)
    at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:313)
    at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:317)
    at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:317)
    at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:173)


Example program that reproduces the error:
---
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class GivesNullPointer {

    public static void main(String[] args) throws Exception {
        XWPFDocument doc = new XWPFDocument(new
FileInputStream("Wordmerge.docx"));

        doc.write(new FileOutputStream("out.docx"));
    }
}

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


Mime
View raw message