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

Robert Munteanu commented on SLING-3639:
----------------------------------------

Can you give me some simple steps to reproduce? I'm traveling today but I'll 
look into it as soon as I can.

> Changing node types to/from sling:Folder within .content.xml fails
> ------------------------------------------------------------------
>
>                 Key: SLING-3639
>                 URL: https://issues.apache.org/jira/browse/SLING-3639
>             Project: Sling
>          Issue Type: Bug
>          Components: IDE
>            Reporter: Stefan Egli
>            Assignee: Robert Munteanu
>             Fix For: Sling Eclipse IDE 1.0.2
>
>
> When changing the type of a node serialized into a .content.xml to/from 
> sling:Folder, various exceptions occur.
> This ticket is to have a reference between the various bugfixes related to 
> this.
> An earlier fix likely related to this is : http://svn.apache.org/r1599996
> Consider the following structure:
> {code}
> grandparent [nt:unstructured]
> \- parent [nt:unstructured]
>  |- child1 [nt:unstructured]
>  \- child2 [nt:unstructured]
> {code}
> initially the structure is serialized into one:
> {code}
> grandparent/.content.xml
> {code}
> If child2 is changed to sling:Folder, the content is published and 
> re-imported, the underlying vault serialization looks as follows:
> {code}
> grandparent/.content.xml
> grandparent/parent/child2/.content.xml
> {code}
> Changing child2 back to nt:unstructured results in:
> {code}
> [June 4, 2014 10:52:04 AM CEST] AddOrUpdateNodeCommand -> 
> /content/okapp/grandparent/parent : JcrResult[ success:true] (53 ms)
> [June 4, 2014 10:52:39 AM CEST] AddOrUpdateNodeCommand -> 
> /content/okapp/grandparent/parent/child2 : JcrResult[ success:false, 
> exception: org.apache.sling.ide.transport.RepositoryException - 
> javax.jcr.nodetype.ConstraintViolationException: node 
> /content/okapp/grandparent/parent/child2: no applicable definition found in 
> parent node's node type] (48 ms)
> org.apache.sling.ide.transport.RepositoryException: 
> javax.jcr.nodetype.ConstraintViolationException: node 
> /content/okapp/grandparent/parent/child2: no applicable definition found in 
> parent node's node type
>       at org.apache.sling.ide.impl.vlt.JcrResult.failure(JcrResult.java:33)
>       at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:62)
>       at 
> org.apache.sling.ide.transport.TracingCommand.execute(TracingCommand.java:43)
>       at 
> org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.execute(SlingLaunchpadBehaviour.java:364)
>       at 
> org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishContentModule(SlingLaunchpadBehaviour.java:330)
>       at 
> org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:182)
>       at 
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091)
>       at 
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183)
>       at 
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:987)
>       at 
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
>       at 
> org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3154)
>       at 
> org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
>       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
> Caused by: javax.jcr.nodetype.ConstraintViolationException: node 
> /content/okapp/grandparent/parent/child2: no applicable definition found in 
> parent node's node type
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>       at 
> org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:69)
>       at 
> org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:51)
>       at 
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.start(RepositoryServiceImpl.java:611)
>       at 
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.access$600(RepositoryServiceImpl.java:547)
>       at 
> org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.submit(RepositoryServiceImpl.java:452)
>       at 
> org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.execute(WorkspaceManager.java:858)
>       at 
> org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.access$500(WorkspaceManager.java:817)
>       at 
> org.apache.jackrabbit.jcr2spi.WorkspaceManager.execute(WorkspaceManager.java:620)
>       at 
> org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.save(SessionItemStateManager.java:139)
>       at org.apache.jackrabbit.jcr2spi.ItemImpl.save(ItemImpl.java:250)
>       at org.apache.jackrabbit.jcr2spi.SessionImpl.save(SessionImpl.java:333)
>       at 
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:113)
>       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:54)
>       ... 11 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to