[Zope] Corrupt Data.fs / ZODB

2005-05-16 Thread Michael Kaplan
Sorry, I already wrote nearly the same mail in April but nobody answered.
Since I cannot believe that there is no simple and well known
solution for this problem - which probably affects many zope users -
I try the same posting again. Any help is welcome but it should not be
an option to erase the last 3 months of work and to return to the state
before the mistake.
 original posting _
I just found out that my Data.fs is corrupt. Zope is still running,
and restarting but I'm getting POSKeyErrors if I want to see folder
contents and in many other situations.
I tried to follow the advice in http://www.zopelabs.com/cookbook/1095965033
(I use Zope-2.7.4) but end up with the 5th item there which says
!!
!! 5. Get at the Zope path for the container of the object that's throwing the 
POSKeyError:
!!
!!  obj=root.unrestrictedTraverse('/path/to/container')
When I try this I get
   obj=root.unrestrictedTraverse('/folder')
Traceback (most recent call last):
File stdin, line 1, in ?
NameError: name 'root' is not defined
what's wrong here? I don't know what the author of this text means
with '/path/to/container' and what I have to put there for 'root'.
Therefore I used fsrefs.py and got information like
oid 0x030571 Products.CMFCore.ActionInformation.ActionInformation
last updated: 2005-03-14 08:20:34.643177, tid=0x35BE85493CF9666L
refers to invalid object:
  oid 0x0304fa object creation was undone:
  'Products.CMFCore.Expression.Expression'
For this oid I get
   python
Python 2.4 (#1, Jan 14 2005, 00:24:33)
[GCC 2.95.3 20010315 (release)] on sunos5
Type help, copyright, credits or license for more information.
   from Zope.Startup.run import configure;configure('/etc/zope.conf')
   from Zope import app
   from ZODB.utils import p64
   from ZODB import POSException
   app = app()
   obj = app._p_jar[p64(0x030571)]
   print obj.getId()
view
   print obj.bobobase_modification_time()
2005/03/14 09:20:34.643 GMT+1
   print obj.meta_type
simple item
   print obj.__ac_local_roles__
None
Could anybody tell me, how I can delete this object from Data.fs?
Will obj.manage_delObjects(id) do the job for me? What parameters
do I have to give to the programm?
Thanks a lot in advance
Michael


begin:vcard
fn:Michael Kaplan
n:Kaplan;Michael
org;quoted-printable:Technische Universit=C3=A4t M=C3=BCnchen;Zentrum Mathematik 
adr;quoted-printable:;;Boltzmannstr.  3;Garching bei M=C3=BCnchen;;85747;Germany 
email;internet:[EMAIL PROTECTED]
title:Dr.
tel;work:+49 89 289 17064
tel;fax:+49 89 289 17457
x-mozilla-html:FALSE
url:http://www.ma.tum.de/~kaplan/
version:2.1
end:vcard

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Corrupt Data.fs / ZODB

2005-05-16 Thread Andreas Jung

--On Montag, 16. Mai 2005 17:18 Uhr +0200 Michael Kaplan 
[EMAIL PROTECTED] wrote:
When I try this I get
obj=root.unrestrictedTraverse('/folder')
Traceback (most recent call last):
 File stdin, line 1, in ?
NameError: name 'root' is not defined
'root' must be 'app'...that's an error in the howto.
-aj



pgpQ79oXTIpA1.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Corrupt Data.fs / ZODB

2005-05-16 Thread Paul Winkler
On Mon, May 16, 2005 at 05:18:08PM +0200, Michael Kaplan wrote:
 I tried to follow the advice in http://www.zopelabs.com/cookbook/1095965033
 (I use Zope-2.7.4) but end up with the 5th item there which says
 
 !!
 !! 5. Get at the Zope path for the container of the object that's throwing 
 the POSKeyError:
 !!
 !!  obj=root.unrestrictedTraverse('/path/to/container')
 
 When I try this I get
 
obj=root.unrestrictedTraverse('/folder')
 Traceback (most recent call last):
 File stdin, line 1, in ?
 NameError: name 'root' is not defined

 what's wrong here? I don't know what the author of this text means
 with '/path/to/container' and what I have to put there for 'root'.

'root' is probably a misprint. If you're using the bin/zopectl
script that comes with zope 2.7.x, you should substitute 'app'
instead of 'root'.

'/path/to/container' is a generic example.
Substitute the path to any container you're interested in. The author 
of the recipe cannot predict what paths are of interest to you.
Only you can know that.

 Therefore I used fsrefs.py and got information like
 
 oid 0x030571 Products.CMFCore.ActionInformation.ActionInformation
 last updated: 2005-03-14 08:20:34.643177, tid=0x35BE85493CF9666L
 refers to invalid object:
   oid 0x0304fa object creation was undone:
   'Products.CMFCore.Expression.Expression'
 
 For this oid I get
 
python
 Python 2.4 (#1, Jan 14 2005, 00:24:33)
 [GCC 2.95.3 20010315 (release)] on sunos5
 Type help, copyright, credits or license for more information.
from Zope.Startup.run import configure;configure('/etc/zope.conf')
from Zope import app
app = app()

Note, there is a shortcut to the above: you can just run the command 
./bin/zopectl debug

from ZODB.utils import p64
from ZODB import POSException
obj = app._p_jar[p64(0x030571)]
print obj.getId()
 view
print obj.bobobase_modification_time()
 2005/03/14 09:20:34.643 GMT+1
print obj.meta_type
 simple item

that's kind of unusual. Most Products have a more descriptive
meta_type.
Sounds like somebody wrote a subclass of OFS.Item.SimpleItem
and did not bother to provide a proper meta_type in their code.
Some grepping of source code in your Products directory might
tell you what this thing really is.

print obj.__ac_local_roles__
 None
 
 Could anybody tell me, how I can delete this object from Data.fs?
 Will obj.manage_delObjects(id) do the job for me? What parameters
 do I have to give to the programm?

No, that would delete a sub-object of obj.  If you want to delete obj
itself, you have to find its parent folder first.
You have found out an id ('view'), a mod time ('2005/03/14 09:20:34.643 GMT+1'),
and a (weird) meta_type ('simple item').  That should give you some
good clues for finding where this object lives, and thus find its parent
folder.  Once you know that, you can follow the zopelabs recipe.

Unfortunately, there is no way to just ask a raw object for
its physical path. You can call obj.getPhysicalPath() 
but it not tell you anything useful on a raw object
(one directly loaded from _p_jar)  because it is lacking
its acquisition context.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Corrupt Data.fs

2005-04-28 Thread Michael Kaplan
Hi,
I just found out that my Data.fs is corrupt. Zope is still running,
and restarting but I'm getting POSKeyErrors if a want to see folder
contents and so on.
I tried to follow the advice in http://www.zopelabs.com/cookbook/1095965033
(I use Zope-2.7.4) but end up with
 obj=root.unrestrictedTraverse('/folder')
Traceback (most recent call last):
  File stdin, line 1, in ?
NameError: name 'root' is not defined
what's wrong here?
Therefore I used fsrefs.py and got information like
oid 0x030571 Products.CMFCore.ActionInformation.ActionInformation
last updated: 2005-03-14 08:20:34.643177, tid=0x35BE85493CF9666L
refers to invalid object:
oid 0x0304fa object creation was undone:
'Products.CMFCore.Expression.Expression'
For this oid I get
 python
Python 2.4 (#1, Jan 14 2005, 00:24:33)
[GCC 2.95.3 20010315 (release)] on sunos5
Type help, copyright, credits or license for more information.
 from Zope.Startup.run import configure;configure('/etc/zope.conf')
 from Zope import app
 from ZODB.utils import p64
 from ZODB import POSException
 app = app()
 obj = app._p_jar[p64(0x030571)]
 print obj.getId()
view
 print obj.bobobase_modification_time()
2005/03/14 09:20:34.643 GMT+1
 print obj.meta_type
simple item
 print obj.__ac_local_roles__
None
Could anybody tell me, how I can delete this object from Data.fs?
Will obj.manage_delObjects(id) do the job for me? What parameters
do I have to give to the programm?
Thanks a lot in advance
  Michael

begin:vcard
fn:Michael Kaplan
n:Kaplan;Michael
org;quoted-printable:Technische Universit=C3=A4t M=C3=BCnchen;Zentrum Mathematik 
adr;quoted-printable:;;Boltzmannstr. ;Garching bei M=C3=BCnchen;;85747;Germany 
email;internet:[EMAIL PROTECTED]
title:Dr.
tel;work:+49 89 289 17064
tel;fax:+49 89 289 17457
url:http://triton.ma.tum.de/~kaplan/
version:2.1
end:vcard

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )