[Zope-dev] What can cause an InvalidObjectReference?

Chris McDonough chrism@zope.com
Fri, 24 Aug 2001 08:38:40 -0400


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


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
>  
> 
> _______________________________________________
> 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 McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"