Hi,
I have a groovy script in a page, that loads some data and create pages and
objects with it.
Basically for each it gets a new Document, create a new Object in it, use it
to set all fields (no one is null), then create a new Object
"XWiki.TagClass", sets the tags, and then saves the document. This process
is repeated, as each input data will generate 2 documents/objects for 2
different custom classes.
For most documents there is no problem, while for some I get the following
kind of exceptions (always for one of the classes, never for the other) :
Error number 3201 in 3: Exception while saving document
MailArchive.MMKSonLinuxpatch22-01
Wrapped Exception: Row was updated or deleted by another transaction (or
unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.DateProperty#2009-09-14 15:57:26.0]
The exact same date string is used to save another document/object without
any problem (the Date fields have exactly same format).
It's not always a DateProperty that cause issues, it can also be Strings or
LargeStrings.
I tried to delete my custom class and recreate it, purge all created
documents (with doc.delete()), and also to purge all entries that were left
even after delete(), directly in database (in tables xwikidoc, xwikiobjects,
xwikistrings, xwikilargestrings, xwikidates and xwikirecyclebin), but it
seems the same input data will always have document.save() fail this way.
It seems it's always the second save() that can fail. This second save()
targets a different document, object and class, and it's not the same groovy
variables either. Could it happen that the first save() is not completely
finished and there is some problem with tables updates ? Would I have
something else to do to make sure previous transaction is finished ?
I believe it must be something in the data, but it's only strings,
largestrings and a date, so I don't know how to investigate more...
Thanks for any help,
Jeremie
PS : I'm on XWiki 2.0.3, MySQL 5.1.38, Linux RH Rel 4
Show replies by date