Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11865

Conversion fails when initial content document does not include namespace declaration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • Content-Package to Feature Model Converter 1.3.2
    • None
    • None

    Description

      I tried upgrading the AEM Analyser project to version 1.3.2 of the CP Converter, but that detected a regression ( see https://github.com/adobe/aemanalyser-maven-plugin/pull/205 ). The failure message is

      > Failed to execute goal com.adobe.aem:aemanalyser-maven-plugin:1.5.9-SNAPSHOT:project-analyse (aem-analyser) on project aemanalyser-maven-plugin-it-content-package-files-test: Content Package Converter Exception Can not convert /tmp/cp2fm-converter16836453237918368470/SLING-INF/apps/my-first-node.xml to enhanced DocView format: javax.jcr.NamespaceException: No URI for prefix 'cq' declared. -> [Help 1]

      The file, as extracted from the bundle, is

      <?xml version="1.0" encoding="UTF-8" ?>
      <!--
        Licensed to the Apache Software Foundation (ASF) under one
        or more contributor license agreements.  See the NOTICE file
        distributed with this work for additional information
        regarding copyright ownership.  The ASF licenses this file
        to you under the Apache License, Version 2.0 (the
        "License"); you may not use this file except in compliance
        with the License.  You may obtain a copy of the License at
         http://www.apache.org/licenses/LICENSE-2.0
        Unless required by applicable law or agreed to in writing,
        software distributed under the License is distributed on an
        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, either express or implied.  See the License for the
        specific language governing permissions and limitations
        under the License.
       -->
      <node>
          <!--
            You can find out more documentation on this topic
            by following these links:
              -  http://sling.apache.org/site/content-loading.html
              -  http://jackrabbit.apache.org/node-type-notation.html
           -->
          <primaryNodeType>nt:unstructured</primaryNodeType>
      
          <property>
              <name>title</name>
              <type>String</type>
              <value>My first node</value>
          </property>
      
          <property>
              <name>description</name>
              <type>String</type>
              <value>This node has been created by a sling bundle.</value>
          </property>
          
          <node>
              <name>cq:EditConfig</name>
              <primaryNodeType>cq:EditConfig</primaryNodeType>
      
              <property>
                  <name>description</name>
                  <type>String</type>
                  <value>Some dummy data from sling initial content.</value>
              </property>
              
              <node>
                  <name>cq:listeners</name>
                  <primaryNodeType>cq:EditListenersConfig</primaryNodeType>
      
                  <property>
                      <name>description</name>
                      <type>String</type>
                      <value>Some dummy data from sling initial content.</value>
                  </property>
                  
              </node>
          </node>
          
          <node>
              
              <name>graniteComponent</name>
              <mixinNodeType>granite:Component</mixinNodeType>
              <primaryNodeType>sling:Folder</primaryNodeType>
      
              <node>
                  <name>granite:data</name>
                  <primaryNodeType>nt:unstructured</primaryNodeType>
      
                  <property>
                      <name>description</name>
                      <type>String</type>
                      <value>Some dummy data from sling initial content.</value>
                  </property>
              </node>
      
              <node>
                  <name>my:subnode</name>
                  <primaryNodeType>nt:unstructured</primaryNodeType>
      
                  <property>
                      <name>description</name>
                      <type>String</type>
                      <value>Some dummy data from sling initial content.</value>
                  </property>
              </node>
              
          </node>
         
      
      </node>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rombert Robert Munteanu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: