any hints?
paul
On 20 août 2014, at 11:37, Paul Libbrecht <paul(a)hoplahup.net> wrote:
Hello XWiki exports,
I've been working on a tool to massively import users from a spreadsheets for
curriki.org (still on xwiki 3.5.1) and I am stumbling into an error that I could not solve
thus far:
org.hibernate.StaleObjectStateException: Row was
updated or deleted by another transaction (or unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.LargeStringProperty#<?xml version="1.0"
encoding="UTF-8"?>
<users>poiapsaodi</users>]
(user-name is invented)
The users element is that of the xwikiRights object.
This exception happens at a saveandcontinue action which is triggered in the object
editor after I (as admin) edit the user. It also happens if the user is logged in.
How can I investigate this?
I've tried changing the way I write the object in the following (adding the "new
String") as it was done in the social-login but still no hope:
def rightobj = userDoc.newObject("XWiki.XWikiRights", xcontext);
rightobj.setStringValue("users", new String(userName));
rightobj.setStringValue("allow", new String("1"));
rightobj.setStringValue("levels", new String("edit"));
rightobj.setStringValue("groups", new String(""));
Note: at curriki, we use the "virtual xwikiUsers group" since we have quite an
amount of them.
Any investigation hint is welcome.
paul