java.lang.RuntimeException: Unexpected exception writing to stringwriter. java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output

Atlassian JIRA | Monique Khairuliana [Atlassian] | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary "Invalid white space character" error thrown when adding an image to a page which contains white space character in the title. h3. Steps to Reproduce # Create a page # Add a white space into the page title. #* For example, copy paste the content of this [^whitespace.txt] file !screenshot-2.png! # Save the page. # Edit the page. Add an image to this page. h3. Expected Results # Image is uploaded successfully, or # Confluence to handle more gracefully, such as provide a better explanation of this error message, or # Have a better mechanism to prevent pages (or spaces) to be saved while there is an invalid character in the title h3. Actual Results Image failed to be uploaded: !image-2016-06-13-21-57-54-453.png! The below exception is thrown in the atlassian-confluence.log file: {code} 2016-06-13 21:32:59,327 ERROR [http-nio-8595-exec-10] [confluence.plugins.dragdrop.UploadAction] execute Failed to save file. -- referer: http://bjorn:8595/confluence/pages/editpage.action?pageId=1769481 | url: /confluence/plugins/drag-and-drop/upload.action | userName: admin | action: upload java.lang.RuntimeException: Unexpected exception writing to stringwriter. java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.atlassian.confluence.content.render.xhtml.Streamables.writeToString(Streamables.java:192) at com.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService.convertEmbeddedImageToEdit(DefaultEditorFormatService.java:103) at com.atlassian.confluence.plugins.dragdrop.UploadAction.getHtmlToEmbedFileIntoEditorContent(UploadAction.java:220) at com.atlassian.confluence.plugins.dragdrop.UploadAction.execute(UploadAction.java:144) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) ... Caused by: java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.atlassian.confluence.content.render.xhtml.Streamables$XmlStreamWriterTemplateStreamable.writeTo(Streamables.java:104) at com.atlassian.confluence.content.render.xhtml.Streamables.writeToString(Streamables.java:188) ... 329 more Caused by: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:494) at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:230) at com.atlassian.confluence.content.render.xhtml.editor.embed.EditorEmbeddedImageTitleWriter.writeEmbeddedImageTag(EditorEmbeddedImageTitleWriter.java:58) at com.atlassian.confluence.content.render.xhtml.view.embed.DefaultAttachedImageResourceMarshaller.lambda$marshal$397(DefaultAttachedImageResourceMarshaller.java:126) at com.atlassian.confluence.content.render.xhtml.DefaultXmlStreamWriterTemplate.execute(DefaultXmlStreamWriterTemplate.java:36) at com.atlassian.confluence.content.render.xhtml.Streamables$XmlStreamWriterTemplateStreamable.writeTo(Streamables.java:102) ... 330 more Caused by: java.io.IOException: Invalid white space character (0xb) in text to output at com.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:545) at com.ctc.wstx.sw.BufferingXmlWriter.writeAttrValue(BufferingXmlWriter.java:1058) at com.ctc.wstx.sw.BufferingXmlWriter.writeAttribute(BufferingXmlWriter.java:891) at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:483) ... 335 more {code} h3. Notes Other scenarios on which this issue happens: # This error message could appear while editing a page. # When the Space Title of the space of the problematic page contains white space: #* !screenshot-1.png! h3.Workaround Rename the page/space title

    Atlassian JIRA | 9 months ago | Monique Khairuliana [Atlassian]
    java.lang.RuntimeException: Unexpected exception writing to stringwriter. java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output

    Root Cause Analysis

    1. java.lang.RuntimeException

      Unexpected exception writing to stringwriter. java.io.IOException: Error while processing callback: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0xb) in text to output

      at com.atlassian.confluence.content.render.xhtml.Streamables.writeToString()
    2. com.atlassian.confluence
      UploadAction.execute
      1. com.atlassian.confluence.content.render.xhtml.Streamables.writeToString(Streamables.java:192)
      2. com.atlassian.confluence.content.render.xhtml.DefaultEditorFormatService.convertEmbeddedImageToEdit(DefaultEditorFormatService.java:103)
      3. com.atlassian.confluence.plugins.dragdrop.UploadAction.getHtmlToEmbedFileIntoEditorContent(UploadAction.java:220)
      4. com.atlassian.confluence.plugins.dragdrop.UploadAction.execute(UploadAction.java:144)
      4 frames
    3. XWork Tiger Extensions
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
      1 frame