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

           Summary: Writing specific sequence of strings to XSSFSheet
                    results in malformed XML
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=25147)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25147)
This patch adds a test case. Created against 3_6 tag.

A specific sequence of strings results in broken CDATA section in
sharedStrings.xml file.

Attached patch adds a test case to 3_6 tag to reproduce the problem.

java.lang.reflect.InvocationTargetException
org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
        at
org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
        at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:256)
        at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:196)
        at
org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:179)
        at
org.apache.poi.xssf.TestBrokenCdata.testWritingSomeStringsResultsInMalformedCdata(TestBrokenCdata.java:53)
Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at
org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
Caused by: java.io.IOException: error: Unexpected character encountered (lex
state 9): '!'
        at
org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:119)
        at
org.apache.poi.xssf.model.SharedStringsTable.<init>(SharedStringsTable.java:97)

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to