jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: importXML() fails with a ConstraintViolationException
Date Tue, 27 May 2008 14:58:47 GMT
Hi,

On Tue, May 27, 2008 at 5:15 PM, Frederic BOY <frederic.v4x@gmail.com> wrote:
> session.exportSystemView("/Video", videoOut, true, false);
> [...]
> session.importXML("/Video", videoIn,
>     ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
> [...]
> ConstraintViolationException: no matching child node definition found for
> child node {}Video.

You're trying to import the "Video" subtree under an existing "Video" node. Try:

    session.importXML("/", videoIn,
        ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

Also, you might want to consider adding a "/content" top-level node
under which you'd place your "Video", "Audio", and "Template" subtrees
(and any other content you may have). This way you could backup your
entire content in a single operation.

BR,

Jukka Zitting

Mime
View raw message