jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: javax.jcr.InvalidItemStateException: Item cannot be saved because it has been mo dified externally: node /
Date Thu, 28 Oct 2010 17:58:27 GMT
Hi,

On Thu, Oct 28, 2010 at 6:40 PM, smjain <jain.sm@gmail.com> wrote:
> I keep getting this error while adding nodes under root/test/
> I use this code String unique =UUID.randomUUID().toString() to generate a
> unique id for the child node
> javax.jcr.InvalidItemStateException: Item cannot be saved because it has
> been mo dified externally: node /
> Pls help.This is urgent

Please don't post the same message repeatedly.

This InvalidItemStateException is caused by concurrent modifications
that Jackrabbit fails to merge automatically. For example, this often
happens when two concurrent clients try to add a child node with the
same name.

Good ways of dealing with this exception are either to manually merge
the changes and retry the save() call, or to explicitly synchronize
concurrent writers using JCR locking or some other synchronization
mechanism.

BR,

Jukka Zitting

Mime
View raw message