You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2023/05/08 13:16:00 UTC

[jira] [Commented] (SLING-11865) Conversion fails when initial content document does not include namespace declaration

    [ https://issues.apache.org/jira/browse/SLING-11865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720503#comment-17720503 ] 

Robert Munteanu commented on SLING-11865:
-----------------------------------------

The build succeeed after I reverted [commit 084e751fb5c170eeee9b701ceee9cee1cfb27aac|https://github.com/apache/sling-org-apache-sling-feature-cpconverter/commit/084e751fb5c170eeee9b701ceee9cee1cfb27aac], so this is caused by SLING-11421 .

The content package used for the conversion is at https://github.com/adobe/aemanalyser-maven-plugin/tree/main/aemanalyser-maven-plugin/src/it/sling-initial-content-packages-test/files  .

[~kwin], [~sseifert] - I am not familiar with Sling-Initial-Content, but this looks like a regression to me. Any ideas on how to fix this?

> Conversion fails when initial content document does not include namespace declaration
> -------------------------------------------------------------------------------------
>
>                 Key: SLING-11865
>                 URL: https://issues.apache.org/jira/browse/SLING-11865
>             Project: Sling
>          Issue Type: Bug
>          Components: Content-Package to Feature Model Converter
>    Affects Versions: Content-Package to Feature Model Converter 1.3.2
>            Reporter: Robert Munteanu
>            Priority: Critical
>             Fix For: Content-Package to Feature Model Converter 1.3.4
>
>
> 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
> {code:xml}
> <?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>
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)