jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan lohwasser <stephan.lohwas...@systemone.at>
Subject session.move() error: ItemExistsException despite same name siblings
Date Mon, 12 Jun 2006 16:33:33 GMT
hello all,

i have a problem moving nodes:
i am trying to move one 'element' node from one 'page' to another 'page'.
elements are always stored below the pages 'element root node'.

the elements are same name siblings below the element root and support 
ordering.
here is the nodetypes.xml excerpt:
<!-- element root definition -->
<nodeType hasOrderableChildNodes="true" isMixin="false" 
name="s1NT:elementRoot">
    [..]
    <childNodeDefinition autoCreated="false" 
defaultPrimaryType="s1NT:element" mandatory="false"
                         name="s1:element" onParentVersion="COPY" 
protected="false" sameNameSiblings="true" hasOrderableChildNodes="true">
        <requiredPrimaryTypes>
            <requiredPrimaryType>s1NT:element</requiredPrimaryType>
        </requiredPrimaryTypes>
    </childNodeDefinition>
</nodeType>

<!-- element definition -->
<nodeType hasOrderableChildNodes="true" isMixin="false" name="s1NT:element">
    [..]
</nodeType>

i do already have 3 same-name-siblings at the destination position:
18:15:05,047 INFO  [ElementFactoryImpl] 
/s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element
18:15:05,047 INFO  [ElementFactoryImpl] 
/s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element[2]
18:15:05,047 INFO  [ElementFactoryImpl] 
/s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element[3]

when i call session.move(srcPath, destPath), with srcPath being: 
/s1:root/s1:pages/s1:page[4]/s1:elementRoot/s1:element and destPath 
being /s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element,  trying to 
move the first element below page[4] to the end of the elments of 
page[3], i get the following logs:
18:15:05,047 INFO  [ElementFactoryImpl] moving 
/s1:root/s1:pages/s1:page[4]/s1:elementRoot/s1:element to 
/s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element
18:15:05,047 ERROR [S1SessionImpl] javax.jcr.ItemExistsException: 
/s1:root/s1:pages/s1:page[3]/s1:elementRoot/s1:element.

do i have any errors in my code or nodetypes xml? the javadocs say this 
happens if i do not have same name siblings, but this can hardly be the 
problem.
thanks a lot
stephan




Mime
View raw message