[Zope] VersionLockError: version object no longer exists

Shane Hathaway shane@digicool.com
Thu, 31 May 2001 18:53:26 -0400


Randy McLaughlin wrote:
> 
> While working through the tutorial and introductory exercises, I appear to
> have pointed myself into a corner.  I worked some versioning examples and
> thought I had closed the version.  I resumed my study and eventually
> returned to Zope to try adding a new object in the root folder.  This
> resulted in a VersionLockError message and stack dump.  I think I've
> figured out that this is a rather dramatic way of saying "this folder is
> locked by another version".  I'm not sure how the root folder ended up
> locked, but it does show that icon.

When, in a version, you add or remove an object from a folder, it locks
the folder in the version.

> I then tried to undo my way out of the problem.  This undid the creation of
> the version object, but not the objects locked by it.  Now I can't get into
> the version, because the version does not exist.  I tried creating a new
> version object by the same name and was able to do so but it did not end up
> being associated with the locked folder.

My guess is you've run into partial version commit bug.  It took a lot
of digging but with a database in this paradoxical state, a database
supplied by Ethan, I found a way that Zope (specifically, FileStorage)
could commit only a part of a version.  It's fixed in Zope 2.4.x (first
alpha released today) and, if Brian chooses to release such a version,
in Zope 2.3.3.

> It would be easy to simply uninstall Zope and reinstall it.  I have nothing
> invested in the current configuration.  But I am uneasy about the
> possibility of this happening later when I do have a site built and in
> production.  I also suspect I will not be the last one bit by this problem.

If this were important, I'd tell you to go ahead and re-create that
version object again then, in the version, change in some way all of the
objects that are locked.  Then commit the version.  Repeat until it
finishes committing.

Or just upgrade. :-)

Shane