Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-13569

Fix preview for document created from an XML export

    XMLWordPrintable

    Details

      Description

      The preview for a document created from an XML export fails with this exception

      ERROR [PreviewRestlet] Could not build preview for missing blob at default
      org.nuxeo.ecm.platform.preview.api.PreviewException: Cannot encode blob content to string
      	at org.nuxeo.ecm.platform.preview.adapter.PlainTextPreviewer.getPreview(PlainTextPreviewer.java:68)
      	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:128)
      	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:113)
      	at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:127)
      	at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.initCachedBlob(PreviewRestlet.java:204)
      	at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.handle(PreviewRestlet.java:136)
      	...
      Caused by: java.io.UnsupportedEncodingException: 
      	at java.lang.StringCoding.decode(StringCoding.java:190)
      	at java.lang.String.<init>(String.java:452)
      	at java.lang.String.<init>(String.java:524)
      	at org.nuxeo.ecm.platform.preview.adapter.PlainTextPreviewer.getPreview(PlainTextPreviewer.java:66)
      	... 79 more
      

      It seems that the blob has now an encoding whose value is "" whereas it was null in the original blob/document.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: