Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-10202

Stream Closed error when converting from Confluence XML to XAR

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.4.3
    • Fix Version/s: None
    • Component/s: Filter - XAR
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:

      1. Install the WikiStream Application and the WikiStream Confluence XML module (both v5.4.3)
      2. Go to WikiStream.WebHome and pick "Confluence XML import stream (confluence+xml)" for the Input Type and "XAR output stream (xwiki+xar/1.1)" for the Output Type
      3. Type in the source of your zip in this format:
        file:D:\xwiki\confluence.zip

        in the Source field from the "INPUT CONFIGURATION"

      4. Type in the target in this format:
        file:D:\xwiki\confluence.xar

        in the Target field from the "OUTPUT CONFIGURATION"

      5. Click Convert

      You'll see this stacktrace:

      Starting job of type [wikistream.converter] with identifier [wikistream/converter/confluence+xml/xwiki+xar/1.1]
      Stream Closed
      class java.io.IOException: Failed to write package at org.xwiki.wikistream.xar.internal.output.XARWikiWriter.close(XARWikiWriter.java:141) at org.xwiki.wikistream.xar.internal.output.XAROutputWikiStream.close(XAROutputWikiStream.java:112) at org.xwiki.wikistream.internal.job.WikiStreamConverterJob.runInternal(WikiStreamConverterJob.java:85) at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:154) at org.xwiki.wikistream.script.internal.ScriptWikiStreamConverterJob.run(ScriptWikiStreamConverterJob.java:75) at org.xwiki.job.internal.DefaultJobManager.runJob(DefaultJobManager.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:113) at java.lang.Thread.run(Unknown Source) Caused by: class org.xwiki.wikistream.WikiStreamException: Failed to write package.xml entry at org.xwiki.wikistream.xar.internal.output.XARWikiWriter.writePackage(XARWikiWriter.java:131) at org.xwiki.wikistream.xar.internal.output.XARWikiWriter.close(XARWikiWriter.java:139) at org.xwiki.wikistream.xar.internal.output.XAROutputWikiStream.close(XAROutputWikiStream.java:112) at org.xwiki.wikistream.internal.job.WikiStreamConverterJob.runInternal(WikiStreamConverterJob.java:85) at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:154) at org.xwiki.wikistream.script.internal.ScriptWikiStreamConverterJob.run(ScriptWikiStreamConverterJob.java:75) at org.xwiki.job.internal.DefaultJobManager.runJob(DefaultJobManager.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:113) at java.lang.Thread.run(Unknown Source) Caused by: class java.io.IOException: Stream Closed at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(Unknown Source) at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.writeOut(ZipArchiveOutputStream.java:1286) at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.writeOut(ZipArchiveOutputStream.java:1271) at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.writeLocalFileHeader(ZipArchiveOutputStream.java:882) at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.putArchiveEntry(ZipArchiveOutputStream.java:629) at org.xwiki.xar.XarPackage.write(XarPackage.java:330) at org.xwiki.wikistream.xar.internal.output.XARWikiWriter.writePackage(XARWikiWriter.java:129) at org.xwiki.wikistream.xar.internal.output.XARWikiWriter.close(XARWikiWriter.java:139) at org.xwiki.wikistream.xar.internal.output.XAROutputWikiStream.close(XAROutputWikiStream.java:112) at org.xwiki.wikistream.internal.job.WikiStreamConverterJob.runInternal(WikiStreamConverterJob.java:85) at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:154) at org.xwiki.wikistream.script.internal.ScriptWikiStreamConverterJob.run(ScriptWikiStreamConverterJob.java:75) at org.xwiki.job.internal.DefaultJobManager.runJob(DefaultJobManager.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:113) at java.lang.Thread.run(Unknown Source)
      Finished job of type [wikistream.converter] with identifier [wikistream/converter/confluence+xml/xwiki+xar/1.1]
      

      I've attached the zip file I used for testing.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              msmeria Manuel Smeria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: