-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.6, 5.8
-
Fix Version/s: 5.6.0-HF30, 5.8.0-HF06, 5.9.2
-
Component/s: Preview
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.