2012-09-20 39 views
2

从plone 3.3.2到plone 4.2.1的迁移失败,并出现PosKeyError错误。我试过这篇文章的食谱http://plonechix.blogspot.com/2009/12/definitive-guide-to-poskeyerror.html。 我运行了error_finder代码片段,但它没有给我任何怀疑。我也尝试使用app.mysite._p_jar[p64(oid)]来调试器中的对象 - 也没有成功,它会失败并出现相同的错误。迁移期间的POSKeyError

如何删除损坏的对象或至少获取有关对象的更多信息(例如其类名称或位置)?

完全回溯:

POSKeyError('\x00\x00\x00\x00\x00\x0ey=',) 
(Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 
An operation previously failed, with traceback: 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZServer/PubCore/ZServerPublisher.py", line 31, in __init__ 
    response=b) 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 443, in publish_module 
    environ, debug, request, response) 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 237, in publish_module_standard 
    response = publish(request, module_name, after_list, debug=debug) 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/ZPublisher/Publish.py", line 134, in publish 
    transactions_manager.commit() 
File "/Users/makmak/Plone/buildout-cache/eggs/Zope2-2.13.16-py2.7.egg/Zope2/App/startup.py", line 301, in commit 
    transaction.commit() 
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_manager.py", line 89, in commit 
    return self.get().commit() 
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 336, in commit 
    t, v, tb = self._saveAndGetCommitishError() 
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 329, in commit 
    self._commitResources() 
File "/Users/makmak/Plone/buildout-cache/eggs/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 443, in _commitResources 
    rm.commit(self) 
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/Connection.py", line 572, in commit 
    oid, serial, transaction) 
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/BaseStorage.py", line 416, in checkCurrentSerialInTransaction 
    committed_tid = self.getTid(oid) 
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 770, in getTid 
    with self._lock: 
File "/Users/makmak/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-macosx-10.4-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 403, in _lookup_pos 
    raise POSKeyError(oid) 
POSKeyError: 0x0e793d 

回答

0

可以使用fsrefs.py找到坏的对象。

使用它极短的文章是:http://nathanvangheem.com/news/fixing-broken-zodb-object-references

+2

在plone 3站点清除并重建portal_catalog后,错误消失。我认为,破碎的物体是目录大脑中的一个,并在重建期间被移除。不知道,但似乎fsrefs脚本不扫描目录大脑,这就是为什么它没有给我任何输出。 – irina

0

我相信这是如果保存点回滚,包括添加对象到目录才会发生same issue I just ran into。我认为这是ZODB中的一个错误,但您可以通过解决任何回滚保存点的方法来解决这个问题,在这种情况下,就是将文件和图像迁移到斑点。因此,如果您修复了将这些文件或图像成功迁移到BLOB(或只是将其删除)的问题,那么它应该会成功。

相关问题