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 2014/10/17 23:06:36 UTC

[jira] [Closed] (SLING-3849) Exporting sub-node causes parent cq:Page change to nt:folder

     [ https://issues.apache.org/jira/browse/SLING-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Munteanu closed SLING-3849.
----------------------------------

> Exporting sub-node causes parent cq:Page change to nt:folder
> ------------------------------------------------------------
>
>                 Key: SLING-3849
>                 URL: https://issues.apache.org/jira/browse/SLING-3849
>             Project: Sling
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: Sling Eclipse IDE 1.0.2
>         Environment: Windows 7 64bit, Eclipse Luna 4.4, Adobe CQ 5.6.0, Java 1.7.0_25 64bit
>            Reporter: Ɓukasz Szwajkowski
>            Assignee: Robert Munteanu
>             Fix For: Sling Eclipse IDE 1.0.4
>
>
> I have been facing an issue with exporting a single node of {{jcr:primaryType}} - {{nt:unstructured}}. I have .context.xml file starting with:
> {code:xml}
>    <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
>     jcr:primaryType="cq:Page">
>     <jcr:content
>         cq:designPath="/etc/designs/project"
>         cq:template="/apps/project/core/templates/lukaszTemplate"
>         jcr:primaryType="cq:PageContent"
>         jcr:title="Carousel"
>         sling:resourceType="project/core/renderers/lukaszRenderer">
>         <configuration
>             jcr:primaryType="nt:unstructured"
>             sling:resourceType = "project/core/components/configuration/pageConfiguration"
>             displayLogo="{Boolean}false"
>             width="box"/>
> {code}
> When I click "export to server" on a {{configuration}} node ({{/content/project-demo/lukasz/carousel-component/jcr:content/configuration}}) I am getting an error:
> {code}
> [14 august 2014 12:02:28 CEST] AddOrUpdateNodeCommand -> /content/project-demo/lukasz/carousel-component : JcrResult[ success:true] (52 ms)
> [14 august 2014 12:02:28 CEST] AddOrUpdateNodeCommand -> /content/project-demo/lukasz/carousel-component : JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content] (7 ms)
> org.apache.sling.ide.transport.RepositoryException: javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content
> 	at org.apache.sling.ide.impl.vlt.JcrResult.failure(JcrResult.java:33)
> 	at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:65)
> 	at org.apache.sling.ide.transport.TracingCommand.execute(TracingCommand.java:43)
> 	at org.apache.sling.ide.eclipse.ui.internal.ExportWizard$1$2.visit(ExportWizard.java:89)
> 	at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:126)
> 	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:85)
> 	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
> 	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
> 	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
> 	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:95)
> 	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52)
> 	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:124)
> 	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:108)
> 	at org.apache.sling.ide.eclipse.ui.internal.ExportWizard$1.run(ExportWizard.java:81)
> 	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
> Caused by: javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content
> 	at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getQNodeDefinition(ItemDefinitionProviderImpl.java:201)
> 	at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getQNodeDefinition(ItemDefinitionProviderImpl.java:90)
> 	at org.apache.jackrabbit.jcr2spi.NodeImpl.createNode(NodeImpl.java:1446)
> 	at org.apache.jackrabbit.jcr2spi.NodeImpl.addNode(NodeImpl.java:186)
> 	at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.createNode(AddOrUpdateNodeCommand.java:170)
> 	at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:95)
> 	at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:103)
> 	at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:80)
> 	at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:1)
> 	at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:57)
> 	... 13 more
> {code}
> In CQ logs I am getting:
> {code}
> 14.08.2014 12:02:28.138 *WARN* [127.0.0.1 [1408010548136] POST /crx/server/crx.default/jcr%3aroot/ HTTP/1.1] org.apache.jackrabbit.core.ItemManager Fallback to nt:unstructured due to unknown child node definition for type '{http://www.day.com/jcr/cq/1.0}PageContent'
> 14.08.2014 12:02:28.138 *WARN* [127.0.0.1 [1408010548136] POST /crx/server/crx.default/jcr%3aroot/ HTTP/1.1] org.apache.jackrabbit.core.ItemManager Fallback to nt:unstructured due to unknown child node definition for type '{http://www.day.com/jcr/cq/1.0}PageContent'
> {code}
> Additionally, in jcr repository my node ({{configuration}}) disappeared together with its parent ({{jcr:content}}) and carousel-component node, which was a {{cq:Page}} node changed its {{jcr:primaryType}} to {{nt:folder}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)