[Zope] May be a problem with ZClass

Chris McDonough chrism@zope.com
Mon, 27 May 2002 17:32:23 -0400


I considered not writing this response, because it's sort of 
embarrassing and might mean that I'll get more questions about it and 
might even be asked to fix it, but here goes. ;-)

This can happen when you import and export ZClasses (not ZClass-based 
products, but actual ZClasses).  There is a subtle bug in the ZClass 
registry code that can cause instances to refer to an older class 
definition.  It's a pretty obscure bug but its bitten me before.  A 
workaround is to export all of your ZClass-based products as well as all 
the objects in your root folder and start with a fresh Data.fs, 
reimporting everything as necessary.

I know, I know.  But it will work. ;-)

Jens Vagelpohl wrote:
> there is something in the ZODB that has a reference to the old class. 
> maybe some old instances. also, try packing the database and restarting 
> after that.
> 
> jens
> 
> 
> On Monday, May 27, 2002, at 03:58 , Luis Martin Arganaraz wrote:
> 
>> Hello everybody.
>> My problem:
>> I made a product with ZClass technology. I don't know why every time 
>> that I start Zope, an old version of my product appear. The unique 
>> information that I could find is in the file "stupid_log_file.log". 
>> This is:
>>
>> 2002-05-27T14:01:46 PROBLEM(100) ZODB Could not import class 
>> 'MixGraphClass' from module '*Z70QZ0TZA5T3p/X/EFDKrA=='
>>
>>
>> Before this problem appear the product work fine, and if I re-import 
>> the newest version after a start, the product work fine too. So I 
>> don't have any idea of what is happening and how I could solve this 
>> situation. I didn'
>> t find anything in the newest version that didn't be in the older 
>> version that suggest me a "code error".
>>
>> Can someone give me any suggestion?
>>
>> Thanks,
>> Martin
>>
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )


-- 
Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"