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

XML document export must manage CDATA

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.4
    • Fix Version/s: 7.10-HF01, 8.1
    • Component/s: Core, Explorer
    • Sprint:
      DevOps Sprint 11

      Description

      WARN  [http-bio-0.0.0.0-8080-exec-18] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
      java.io.IOException: Failed to read zip entry: nuxeo-platform/Bundles/bg-grp-org-nuxeo-ecm-platform/bundle-org-nuxeo-usermapper/component-org-nuxeo-usermapper-service-usermappercomponent/xp-org-nuxeo-usermapper-service-usermappercomponent-mapper/document.xml
              at org.nuxeo.ecm.core.io.impl.plugins.NuxeoArchiveReader.loadXML(NuxeoArchiveReader.java:272)
              at org.nuxeo.ecm.core.io.impl.plugins.NuxeoArchiveReader.readOrderedStream(NuxeoArchiveReader.java:225)
              at org.nuxeo.ecm.core.io.impl.plugins.NuxeoArchiveReader.read(NuxeoArchiveReader.java:127)
              at org.nuxeo.ecm.core.io.impl.AbstractDocumentReader.read(AbstractDocumentReader.java:41)
              at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.readAndWriteDocs(DocumentPipeImpl.java:117)
              at org.nuxeo.ecm.core.io.impl.DocumentPipeImpl.run(DocumentPipeImpl.java:95)
              at org.nuxeo.apidoc.snapshot.SnapshotManagerComponent.importTmpSnapshot(SnapshotManagerComponent.java:310)
              at org.nuxeo.apidoc.browse.Distribution.uploadDistribTmp(Distribution.java:376)
      Caused by: org.dom4j.DocumentException: Error on line 87 of document  : The element type "nxextensionpoint:documentation" must be terminated by the matching end-tag "</nxextensionpoint:documentation>". Nested exception: The element type "nxextensionpoint:documentation" must be terminated by the matching end-tag "</nxextensionpoint:documentation>".
              at org.dom4j.io.SAXReader.read(SAXReader.java:482)
              at org.dom4j.io.SAXReader.read(SAXReader.java:343)
              at org.nuxeo.ecm.core.io.impl.plugins.NuxeoArchiveReader.loadXML(NuxeoArchiveReader.java:268)
              ... 102 more
      

      In org.nuxeo.ecm.core.io.impl.ExportedDocumentImpl.readProperty(Element, Namespace, Field, Object, boolean), the simpleType values are wrapped into a CDATA element. That will generate invalid XML if the value contains itself a CDATA element.
      => Use the character sequence ]] ]]> <![CDATA[ > to replace closing CDATA ]]> in the value.

      http://stackoverflow.com/questions/223652/is-there-a-way-to-escape-a-cdata-end-token-in-xml

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: