You are not logged in Log in Join
You are here: Home » Members » jmeile » My upgrade from Zope 2.5.1 to 2.6.0 » howto_view

Log in
Name

Password

 

My upgrade from Zope 2.5.1 to 2.6.0

 

Created by jmeile . Last modified 2005-08-31 12:33:36.

Describes and solves some issues that exist when upgrading from 2.5.1 to 2.6.0 and 2.6.1 (Some of them have been already fixed on 2.6.2).

When I made this how-to, I updated my zope from 2.5.1 to 2.6.0. However, some problems apply also to 2.6.1

Because I had some problems and I've seen that some people are having them too, I will tell you how I solved them.

The first time I tried the upgrade I was having the following problems:

  1. Error messages related to ZCatalog and OFSP:

    2002-11-05T20:54:06 ERROR(200) Zope Couldn't install OFSP
    Traceback (innermost last):
    Module OFS.Application, line 700, in install_product
    - __traceback_info__: OFSP
    Module ZODB.Transaction, line 222, in commit
    Module ZODB.Transaction, line 195, in commit
    Module ZODB.Transaction, line 256, in _commit_objects
    Module ZODB.Connection, line 389, in commit
    - __traceback_info__: (('intSet', 'intSet'),
    '\x00\x00\x00\x00\x00\x00\x08:', '')
    Module ZODB.FileStorage, line 705, in store
    ConflictError: database conflict error (oid 000000000000083a, serial was
    0348a51f52d8776e, now 0000000000000000)
    ------
    2002-11-05T20:54:08 ERROR(200) Zope Couldn't install ZCatalog
    Traceback (innermost last):
    Module OFS.Application, line 700, in install_product
    - __traceback_info__: ZCatalog
    Module ZODB.Transaction, line 222, in commit
    Module ZODB.Transaction, line 195, in commit
    Module ZODB.Transaction, line 256, in _commit_objects
    Module ZODB.Connection, line 389, in commit
    - __traceback_info__: (('intSet', 'intSet'),
    '\x00\x00\x00\x00\x00\x00\x0e\xb6', '')
    Module ZODB.FileStorage, line 705, in store
    ConflictError: database conflict error (oid 0000000000000eb6, serial was
    0348a51f6ab4c9a2, now 0000000000000000)

  2. Error importing Folderisch ZClases (classes which contain other clases):

    First you will see something like this:

    ZODB Couldn't load state for '\x00\x00\x00\x00\x00\x01\x91+'

    Traceback (innermost last):
    Module ZODB.Connection, line 533, in setstate
    Module ZODB.Connection, line 192, in _persistent_load - __traceback_info__: .
    Module ZODB.Connection, line 131, in __getitem__
    - __traceback_info__: Here comes a lot of strange characters
    Could not load oid ., pickled data in traceback info may contain clues

    At the end of all of this comes:

    ------
    2002-11-05T20:59:59 PROBLEM(100) ZODB Could not import class 'YourClass' from module '*nskuqovTqw3NvqWvBdGN0g=='
    ------

  3. When creating new ZCatalogs (this doesn't affect the old ones), the type of my indexed objects were allways ZCatalog (In zope 2.6.1 is Unknown) and some indexes and metadata like id, title, and path were gone.

I have no idea what was the reason of the first problem, but don't worry, I have a solution ;-)

According to some messages of the newsgroups, the second problem is due a change in the zope interfaces (I've not more information, sorry) and the third one is because there's no more default metadata and indexes, so you have to add them by hand and/or in your code.

The solution:

Before following the next steps, I recommend you to make a copy of your Zope DB. I won't be responsible if something goes wrong and you don't have a backup.

I will assume that you have also a fresh installation of Zope 2.6.0 withouth anything on it and off course your old Zope 2.5.1.

  1. If you have ZClasses that are based on ObjectManager, delete the suboject references in the "Subobjects Tab", then press save changes and export them. (this step will solve the second problem)

  2. In your new installation import them and add the subobject references.

  3. From your old zope export your other ZClasses and import them in your new installation.

  4. Install the other products that you are using. (I mean the python based stuff).

  5. Export all the contents of the root folder of your old zope and reimport them into the new installation. (This will solve the first problem)

  6. The following steps will solve the third problem.

  7. If you want to create new ZCatalogs, remmember to add 'meta_type', 'id', and 'title' in your metadata. If you want to sort your results by those fields, then add also some indexes. Finally you have to recatalog your objects by doing a "Find Objects" or just updating the catalog in the "Advance" tab.

  8. If you have ZClases that create their own ZCatalog on their constructor method, you have to create the respective metadata and indexes:

    <dtml-call "Catalog.manage_addColumn('meta_type')">
    <dtml-call "Catalog.manage_addIndex('meta_type','FieldIndex')">

    <dtml-call "Catalog.manage_addColumn('id')">
    <dtml-call "Catalog.manage_addIndex('id','FieldIndex')">

    <dtml-call "Catalog.manage_addColumn('title')">
    <dtml-call "Catalog.manage_addIndex('title','TextIndex')">

    <dtml-call "Catalog.manage_addIndex('path','PathIndex')">

That's all folks! Please note that I didn't suggest to overwrite the new "Data.fs" with the old one because it didn't work for me and for some people either.

Special thanks to:

Sascha, who gave me some references, Gidon Friedman for its apport to the list, and Maik Jablonski who told me about the metadata problem.

If there is a bug or something is missing, please let me now:
Here you'll find more how-tos and products I've published.