On Tue, Oct 6, 2009 at 13:23, Simon Gaeremynck <[email protected]> wrote: > If it helps I am using Mac OS X 10.6.1 with the built-in WebDAV client in > Finder using java 1.6.0_15
> Can anyone shed some light on why I am getting this exception and what I > should do to prevent it? > 06.10.2009 11:41:18.075 *ERROR* [ObservationManager] > org.sakaiproject.kernel.files.FileObserver Item cannot be saved because it > has beenmodified externally: node / javax.jcr.InvalidItemStateException: > Item cannot be saved because it has beenmodified externally: node / I could imagine that there are multiple saves() happening at the webdav level. The Mac Webdav client for example renames files when it modifies them, and when creating files, it will create an empty file first. Since each request will save, you have some intermediary steps in the JCR that have to be handled. In this case I think while your event listener handles the first session.save(), the webdav client again modifies the nodes in question and saves before your listener, hence you get a conflict. A solution could be to queue events and wait some time before acting upon them. Regards, Alex -- Alexander Klimetschek [email protected]
