Attempt to store an object from a foreign database connection?
Hi All! My situation is this: When creating CPS sites I sometimes see one of the tracebacks appended below. In its factory method (manage_addCPSSite) CPS creates two External Methods (cpsinstall & cpsupdate) inside a fresh CMF portal, and then executes these. During execution cpsupdate imports some components from .zexp files into portal tools. What does it mean when "the connection" is "closed"? Where does the "foreign database connection" come from in the first place? Is it probably not a good idea to run External Methods from inside a factory method? I can not all too reliably reproduce this but what I do is constantly create and delete CPS sites as I am customizing the mentioned External Methods. I also noticed that after a restart it works for a while, and then suddenly starts bombing out (after approx. 2 minutes). Once it is broken the error persists and I have to restart to be able to add a CPS site again. Happens with Zope 2.5.1 and 2.6.0 on Mac OS X and GNU/Linux Any hints appreciated, Stefan -- 2002-12-09T17:02:13 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 79, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {}, None) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 101, in cpsinstall Module ZODB.Connection, line 504, in setstate RuntimeError: Shouldn't load state for '\x00\x00\x00\x00\x00\x00\x1fa' when the connection is closed 2002-12-08T23:30:12 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 81, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {'langs_list': None}, (None,)) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 665, in cpsupdate Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 53, in tryimport Module OFS.ObjectManager, line 546, in _importObjectFromFile Module ZODB.ExportImport, line 79, in importFile 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 387, in commit - __traceback_info__: (('Products.CMFCore.ActionsTool', 'ActionsTool'), '\x00\x00\x00\x00\x00\x00h\x11', '') InvalidObjectReference: Attempt to store an object from a foreign database connection 2002-12-09T00:24:58 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 81, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {'langs_list': None}, (None,)) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 665, in cpsupdate Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 53, in tryimport Module OFS.ObjectManager, line 546, in _importObjectFromFile Module ZODB.ExportImport, line 79, in importFile 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 382, in commit - __traceback_info__: (('Products.CMFCore.ActionInformation', 'ActionInformation'), '\x00\x00\x00\x00\x00\x00\x97\xf3', '') Module ZODB.Connection, line 507, in setstate Module ZODB.TmpStore, line 49, in load Module ZODB.FileStorage, line 619, in load Module ZODB.FileStorage, line 593, in _load POSKeyError: 00000000000097f3 -- Those who write software only for pay should go hurt some other field. /Erik Naggum/
See "Mounted Transient Object Container Caveats" in http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx for an explanation. The error you're getting means that somehow the code is trying to store an object that has references to objects in one ZODB database into another ZODB database (probably a mounted database). On Mon, 2002-12-09 at 12:50, Stefan H. Holek wrote:
Hi All!
My situation is this: When creating CPS sites I sometimes see one of the tracebacks appended below.
In its factory method (manage_addCPSSite) CPS creates two External Methods (cpsinstall & cpsupdate) inside a fresh CMF portal, and then executes these. During execution cpsupdate imports some components from .zexp files into portal tools.
What does it mean when "the connection" is "closed"? Where does the "foreign database connection" come from in the first place? Is it probably not a good idea to run External Methods from inside a factory method?
I can not all too reliably reproduce this but what I do is constantly create and delete CPS sites as I am customizing the mentioned External Methods. I also noticed that after a restart it works for a while, and then suddenly starts bombing out (after approx. 2 minutes). Once it is broken the error persists and I have to restart to be able to add a CPS site again.
Happens with Zope 2.5.1 and 2.6.0 on Mac OS X and GNU/Linux
Any hints appreciated, Stefan
--
2002-12-09T17:02:13 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 79, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {}, None) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 101, in cpsinstall Module ZODB.Connection, line 504, in setstate RuntimeError: Shouldn't load state for '\x00\x00\x00\x00\x00\x00\x1fa' when the connection is closed
2002-12-08T23:30:12 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 81, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {'langs_list': None}, (None,)) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 665, in cpsupdate Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 53, in tryimport Module OFS.ObjectManager, line 546, in _importObjectFromFile Module ZODB.ExportImport, line 79, in importFile 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 387, in commit - __traceback_info__: (('Products.CMFCore.ActionsTool', 'ActionsTool'), '\x00\x00\x00\x00\x00\x00h\x11', '') InvalidObjectReference: Attempt to store an object from a foreign database connection
2002-12-09T00:24:58 ERROR(200) SiteError http://127.0.0.1:8084/manage_addProduct/NuxCPS/manage_addCPSSite Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.NuxCPS.CPSSite, line 81, in manage_addCPSSite Module Products.ExternalMethod.ExternalMethod, line 231, in __call__ - __traceback_info__: ((), {'langs_list': None}, (None,)) Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 665, in cpsupdate Module /Users/zope/w4/Products/NuxCPS/Extensions/cpsinstall.py, line 53, in tryimport Module OFS.ObjectManager, line 546, in _importObjectFromFile Module ZODB.ExportImport, line 79, in importFile 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 382, in commit - __traceback_info__: (('Products.CMFCore.ActionInformation', 'ActionInformation'), '\x00\x00\x00\x00\x00\x00\x97\xf3', '') Module ZODB.Connection, line 507, in setstate Module ZODB.TmpStore, line 49, in load Module ZODB.FileStorage, line 619, in load Module ZODB.FileStorage, line 593, in _load POSKeyError: 00000000000097f3
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Chris! I am not using any mounted database. The factory method does not use sessions either. I am still suspecting that doing imports from a factory method sometimes gives me a strange _p_jar or something along that lines... Still at loss where this "foreign" connection could come from. Thanks, Stefan --On Montag, 09. Dezember 2002 13:09 -0500 Chris McDonough <chrism@zope.com> wrote:
See "Mounted Transient Object Container Caveats" in http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx for an explanation. The error you're getting means that somehow the code is trying to store an object that has references to objects in one ZODB database into another ZODB database (probably a mounted database).
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
I'm not sure either, but that's nonetheless the cause of the error message. You'd need to step through the transaction commit in the debugger to find out what's going on. On Tue, 2002-12-10 at 09:34, Stefan H. Holek wrote:
Chris!
I am not using any mounted database. The factory method does not use sessions either. I am still suspecting that doing imports from a factory method sometimes gives me a strange _p_jar or something along that lines...
Still at loss where this "foreign" connection could come from.
Thanks, Stefan
--On Montag, 09. Dezember 2002 13:09 -0500 Chris McDonough <chrism@zope.com> wrote:
See "Mounted Transient Object Container Caveats" in http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx for an explanation. The error you're getting means that somehow the code is trying to store an object that has references to objects in one ZODB database into another ZODB database (probably a mounted database).
-- Those who write software only for pay should go hurt some other field. /Erik Naggum/
participants (2)
-
Chris McDonough -
Stefan H. Holek