hi john

Concerning the problem 2 (move), here is an example :

jcrSession.move(
            fichierNode.path,
            fichierNode.parent.path + '/' + 'newName')

fichierNode.setProperty( JcrConstants.ELIOT_DATE_MODIFICATION,
Calendar.getInstance() )

jcrSession.save() => throws javax.jcr.PathNotFoundException: <old path>

The problem is solved when I update the property before the move.

depending on the nature of your "fichierNode" this
could be the same as JCR-2472, which has been fixed for 2.1

For the problem 1, I give you a short description followed by my concrete
code.
I have 2 mixin types, let's say A and B, with B that inherits A.
When I add the type A, and then the type B I get an exception
javax.jcr.nodetype.ConstraintViolationException:
no matching property definition found for ...
It works when I save the session after adding the type A.

    *jcrSession.save() => Without that save it works with the Repository
from core, but not with a webdav connection*

not sure, but the reason for this might be that in jcr2spi mixin types
are only effective on a given node *after* save() [1].
in this part jcr2spi works different than jackrabbit-core since
jcr2spi doesn't not have the ability to create autocreated items
such as e.g. defined by mix:referenceable and mix:versionable and
may not be able to detect conflicts arising from adding the mixin
type. this is therefore delegated to the SPI implementation.

regards
angela

[1] see section "10.10 Node Type Assignment" of the specification
    and the following quote from the javadoc of Node#addMixin:
    "Semantically, the new node type may take effect immediately,
     on dispatch or on persist."



Reply via email to