[Zope-dev] plone 4.1: can not access plone 3.5 site after startup

Leonardo Rochael Almeida leorochael at gmail.com
Wed Mar 2 07:19:35 EST 2011


I usually saw this error when some of the objects persisted in the
ZODB have references  to (i.e. they directly provide) interfaces that
are not there in the code anymore anymore, such as when an interface
class is removed or moved to another module or package.

It can be solved by providing the old interface in the same place in
the 'module/package' namespace. Or by removing the interface reference
from the object in the old environment before starting the code in the
new environment.

Incidentally, I'm of the opinion that these kinds of errors should be
captured by either zope.interface or by ZODB, logged as 'ERROR', and
the object returned without the faulty interface, but that seems to
require either adding knowledge about zope.interface to ZODB or
vice-versa.

Cheers,

On Wed, Mar 2, 2011 at 12:07, robert rottermann <robert at redcor.ch> wrote:
> Hi there,
> I created a 4.1a3 buildout and added all needed products, of which I had to
> adapt some to be able to start at all.
> Then I copied the data.fs of a 3.5x site.
>
> Now in the ZMI, when I want to navigate to the plone 3.5 folder I get the
> following error:
>
> What can I do to fix that?
> Do I have to prepare the Data.fs somehow?
>
> thanks
> robert
>
> 2011-03-02 11:57:55 ERROR Zope.SiteErrorLog 1299063475.730.425785426825
> http://localhost:8481/focus/focus
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 115, in publish
>   Module ZPublisher.BaseRequest, line 437, in traverse
>   Module ZPublisher.BeforeTraverse, line 97, in __call__
>   Module Products.CMFCore.PortalObject, line 78, in __before_publishing_traverse__
>   Module zope.event, line 23, in notify
>   Module zope.component.event, line 24, in dispatch
>   Module zope.component._api, line 136, in subscribers
>   Module zope.component.registry, line 321, in subscribers
>   Module zope.interface.adapter, line 585, in subscribers
>   Module zope.component.event, line 32, in objectEventNotify
>   Module zope.component._api, line 136, in subscribers
>   Module zope.component.registry, line 321, in subscribers
>   Module zope.interface.adapter, line 585, in subscribers
>   Module plone.browserlayer.layer, line 14, in mark_layer
>   Module zope.component._api, line 179, in getAllUtilitiesRegisteredFor
>   Module zope.component.registry, line 176, in getAllUtilitiesRegisteredFor
>   Module ZODB.Connection, line 859, in setstate
>   Module ZODB.Connection, line 913, in _setstate
>   Module ZODB.serialize, line 613, in setGhostState
>   Module zope.component.persistentregistry, line 40, in __setstate__
>   Module zope.interface.adapter, line 91, in _createLookup
>   Module zope.interface.adapter, line 439, in __init__
>   Module zope.interface.adapter, line 476, in init_extendors
>   Module zope.interface.adapter, line 480, in add_extendor
> AttributeError: type object 'IDatabaseSettings' has no attribute '__iro__'
> 2011-03-02 11:57:55 WARNING OFS.Uninstalled Could not import class
> 'IThemeSpecific' from module 'focus.theme.browser.interfaces'
> 2011-03-02 11:57:55 WARNING OFS.Uninstalled Could not import class
> 'IFocViewletManager' from module 'focus.theme.browser.interfaces'
> 2011-03-02 11:57:55 ERROR ZODB.Connection Couldn't load state for 0x19746b
> Traceback (most recent call last):
>   File
> "/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/Connection.py",
> line 859, in setstate
>     self._setstate(obj)
>   File
> "/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/Connection.py",
> line 913, in _setstate
>     self._reader.setGhostState(obj, p)
>   File
> "/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/serialize.py",
> line 613, in setGhostState
>     obj.__setstate__(state)
>   File
> "/home/zope/focus4/eggs/zope.component-3.10.0-py2.6.egg/zope/component/persistentregistry.py",
> line 40, in __setstate__
>     self._createLookup()
>   File
> "/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py",
> line 91, in _createLookup
>     self._v_lookup = self.LookupClass(self)
>   File
> "/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py",
> line 439, in __init__
>     self.init_extendors()
>   File
> "/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py",
> line 476, in init_extendors
>     self.add_extendor(p)
>   File
> "/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py",
> line 480, in add_extendor
>     for i in provided.__iro__:
> AttributeError: type object 'IDatabaseSettings' has no attribute '__iro__'


More information about the Zope-Dev mailing list