[
https://issues.apache.org/jira/browse/SLING-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038718#comment-14038718
]
Robert Munteanu commented on SLING-3656:
----------------------------------------
There are a couple of places where we have a simplistic handling of file nodes:
- The SerializationDataBuilder does not take into account mixin types when
deciding if an extra serialization directory is needed
- The ImportRepositoryContentAction does not descend into nt:resource children
of an nt:file, only writing the binary jcr:data property as the file's contents.
> nested nodes below file/jcr:content cause problems on import and export
> -----------------------------------------------------------------------
>
> Key: SLING-3656
> URL: https://issues.apache.org/jira/browse/SLING-3656
> Project: Sling
> Issue Type: Bug
> Components: IDE
> Reporter: Stefan Egli
> Assignee: Robert Munteanu
> Priority: Critical
> Fix For: Sling Eclipse IDE 1.0.0
>
> Attachments: sample.zip
>
>
> With a structure as follows:
> {code}
> \-file [nt:file]
> \- jcr:content [nt:resource] [mixin:sling:chunks]
> \- chunk1 [sling:chunk]
> {code}
> .. there are problems both on import as well as export.
> * On import, the structure below file (and thus implicitly jcr:content -
> which usually gets aggregated into only one file) is ignored - preventing
> importing the chunk1 into eclipse
> * On export - given the import would work (use attached sample.zip for
> reference) - the uploading of the '_jcr_content' structure adjacent to the
> file causes confusion, resulting in the exception below:
> {code}
> Failed publishing
> path=/content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content,
> result=JcrResult[ success:false, exception:
> org.apache.sling.ide.transport.RepositoryException -
> javax.jcr.RepositoryException: No parent found at
> /content/sample1/en/_jcr_content/par/image/file.dir ; it's needed to create
> node at /content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content]
> {code}
> {code}
> [June 10, 2014 6:32:33 PM CEST] AddOrUpdateNodeCommand ->
> /content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content : JcrResult[
> success:false, exception: org.apache.sling.ide.transport.RepositoryException
> - javax.jcr.RepositoryException: No parent found at
> /content/sample1/en/_jcr_content/par/image/file.dir ; it's needed to create
> node at /content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content]
> (6134 ms)
> org.apache.sling.ide.transport.RepositoryException:
> javax.jcr.RepositoryException: No parent found at
> /content/sample1/en/_jcr_content/par/image/file.dir ; it's needed to create
> node at /content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content
> 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:396)
> at
> org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishContentModule(SlingLaunchpadBehaviour.java:374)
> at
> org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:192)
> 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.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:137)
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
> at
> org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:54)
> 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.RepositoryException: No parent found at
> /content/sample1/en/_jcr_content/par/image/file.dir ; it's needed to create
> node at /content/sample1/en/_jcr_content/par/image/file.dir/_jcr_content
> at
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.createNode(AddOrUpdateNodeCommand.java:233)
> at
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:97)
> 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)
> ... 12 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)