On Friday 24 August 2001 06:38 am, Chris McDonough wrote:
This will happen if yoiu've got a mounted ZODB database, and you attempt to store an object in the mounted database which has references to other objects in the "main" database (or vice versa).
For more info, read the docs that ship with CoreSessionTracking.
- C
Interesting to know but unfortunately it doesn't cover this situation as far as I can tell. I have only one ZODB and the objects are stored directly in there. There are no other databases being used with it either (ie an SQL DB). The objects are CatalogAware though and do catalog themselves in the catalog. On the windows server this operation will cause the InvalidObjectReference nearly every time an object is created and much of the time when an object is changed. To make matters worse on the unix boxes the items create and catalog themselves just fine most of the time. On them the error seems to occur about once per week or so. When I look in the Catalog though everything looks normal. It has a PrincipiaSearchSource that has the keywords I would expect along with the date it was changed etc. It is a default Catalog without any custom indexes etc added to it at this point. PrincipiaSearchSource for my object returns a string of all the words it wants cataloged. Thanks again
kosh wrote:
When a product I have was stuck on a windows server this seems to happen a lot. On the unix servers I have been running the product on normally this seems to happen about once/week under pretty heavy usage.
This is the error message Error Type: InvalidObjectReference Error Value: Attempt to store an object from a foreign database connection
This is the traceback for it Traceback (innermost last): File D:\ZOPE1\lib\python\ZPublisher\Publish.py, line 223, in publish_module File D:\ZOPE1\lib\python\ZPublisher\Publish.py, line 187, in publish File D:\ZOPE1\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook File D:\ZOPE1\lib\python\ZPublisher\Publish.py, line 175, in publish File D:\ZOPE1\lib\python\Zope\__init__.py, line 235, in commit File D:\ZOPE1\lib\python\ZODB\Transaction.py, line 300, in commit File D:\ZOPE1\lib\python\ZODB\Connection.py, line 375, in commit (Info: (('Products.CompoundDoc.inputtext', 'InputText'), '\000\000\000\000\000\000-t', '')) InvalidObjectReference: (see above)
I am mostly wondering what kinds of things in my code could cause this problem. Mostly I need a place to start to try and debug this.
The "fix" I have normally used is that if I hit refresh the problem will go away until it happens again. It just allows you to keep working with it again until whatever it is that causes it causes it again. I hope that helps some also.
Thanks Kosh