XLSX: OkapiMergeException: Error merging from original file : "Markup writing failed" (from openxml.MarkupZipSkeleton.java)

Create issue
Issue #1144 resolved
Philippe Henri created an issue

this happens with the attached file, trying to convert the xlf back to xlsx (using tikal round trip):

tikal.sh -x table2.xlsx

tikal.sh -m -trace table2.xlsx.xlf → EXCEPTION : Markup writing failed

Comments (7)

  1. Denis Konovalyenko

    Below are more details of the thrown exception:

    java.lang.IllegalStateException: Markup writing failed
    
        at net.sf.okapi.filters.openxml.MarkupZipSkeleton.getModifiedContents(MarkupZipSkeleton.java:65)
        at net.sf.okapi.filters.openxml.OpenXMLFilterWriter.processDocumentPart(OpenXMLFilterWriter.java:397)
        at net.sf.okapi.filters.openxml.OpenXMLFilterWriter.handleEvent(OpenXMLFilterWriter.java:238)
    ...
    Caused by: javax.xml.stream.XMLStreamException: Trying to output second root, <dxf>
        at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1596)
        at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1603)
        at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1631)
        at com.ctc.wstx.sw.BaseNsStreamWriter.checkStartElement(BaseNsStreamWriter.java:483)
        at com.ctc.wstx.sw.SimpleNsStreamWriter.writeStartOrEmpty(SimpleNsStreamWriter.java:257)
        at com.ctc.wstx.sw.BaseNsStreamWriter.writeStartElement(BaseNsStreamWriter.java:325)
        at org.codehaus.stax2.ri.Stax2EventWriterImpl.add(Stax2EventWriterImpl.java:100)
        at net.sf.okapi.filters.openxml.MarkupZipSkeleton.getModifiedContents(MarkupZipSkeleton.java:60)
    

    So, writing inconsistent opening and closing tags can be viewed as the root cause of this issue.

  2. Philippe Henri reporter

    Hi @Denis Konovalyenko all right but I did not do anything with the file, only the round trip: tikal extract then tikal merge… ?

  3. Philippe Henri reporter

    thanks @Denis Konovalenko that was a fast fix, wow ! ok will wait to hear from you for #1143 ( and perhaps #1141 ? which is not a bug as such but a very frustrating problem for users)

    thanks!

  4. Log in to comment