[
https://issues.apache.org/jira/browse/SLING-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030737#comment-14030737
]
Robert Munteanu commented on SLING-3658:
----------------------------------------
The error seems to be triggered by the jcr:content child. So this works
{code}<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OrderedFolder"
jcr:title="Haha">
<file1.txt/>
<file2.txt/>
<file3.txt/>
</jcr:root>{code}
but this doesn't:
{code}<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OrderedFolder"
jcr:title="Haha">
<file1.txt/>
<file2.txt/>
<jcr:content jcr:primaryType="nt:unstructured">
<child jcr:primaryType="nt:unstructured"/>
</jcr:content>
<file3.txt/>
</jcr:root>{code}
> Could not publish to the server. java.util.NoSuchElementException
> -----------------------------------------------------------------
>
> Key: SLING-3658
> URL: https://issues.apache.org/jira/browse/SLING-3658
> Project: Sling
> Issue Type: Bug
> Components: IDE
> Reporter: Stefan Egli
> Assignee: Robert Munteanu
> Priority: Critical
> Fix For: Sling Eclipse IDE 1.0.0
>
> Attachments: ordered(2).zip
>
>
> Consider the following scenario:
> * an orderable parent node
> ** with eg a jcr:content that has some child nodes
> * gets imported into a content project
> * when exporting (uploading) the content to the server, the exception below
> occurs
> * (The problem seems to be AddOrUpdateNodeCommand.getCoveredChildren treats
> the file*.txt as empty and filters them out - while the files should indeed
> be updated to the server.
> {code}
> java.util.NoSuchElementException
> at java.util.AbstractList$Itr.next(AbstractList.java:350)
> at
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.reorderChildNodes(AddOrUpdateNodeCommand.java:189)
> at
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.reorderChildNodes(AddOrUpdateNodeCommand.java:211)
> at
> org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:119)
> 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)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)