Re: continuing saga of weird EOF exceptions
Re: continuing saga of weird EOF exceptions
- Subject: Re: continuing saga of weird EOF exceptions
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 11 Aug 2003 15:08:00 -0500
[Apple's list seems to have recently set it's 'maximum size of message'
somewhat lower than it used to be. Trim unwanted quotations from your
message if you want it to get through!]
At 12:23 PM 8/11/2003 -0700, Chuck Hill wrote:
Are you trying to set NSLog levels from the command line on Solaris by
chance? I had trouble with this once. It worked fine on OS X and Win2K,
but not Solaris. I suspect it is a bug related to static initialization
in the Solaris JVM version I was using. I subsequently switched to
reading this from a configuration file and setting it in code so I never
looked into it beyond this.
I am on Solaris, but I'm trying to do it in code. In my app constructor.
But it doens't seem to have any effect. Very mysterious. Soon I'll have to
spend the time to investigate in depth.
The exception below is what I would expect to see if you have a
relationship from an eo in one ec to an eo in another ec.
[...]
Notice the two ec indentities are not the same.
Is there any chance that when you refactored your code to use peer ec's
that you accidentally crossed editing contexts somewhere?
Hmm, it's possible, but I don't think so. Looking at the code, it looks
unlikely, although I should look even closer to be sure. But I've never
seen that exception from a cross-EC relationship; similarly obscure
exceptions, yes, not this exact one though.
From the stack trace it appears that this error may be getting raised
from an ec other than the one you are saving in. That could make
tracking it down that much more difficult.
I'm not sure that's so; I was trying to decide whether that was the case or
not, but from the stack trace, couldn't figure it out. What makes you say this?
It does seem to have something to do with delete rules
(propagateDeleteWithEditingContext). The object being deleted has a
'nullify' rule on one of it's relationships. As a result of the delete,
inside propagateDelete..., EOF seems to be going to the destination of this
relationship, and then trying to remove the deleted object from the
reciprocal relationship. In the original EC, or some other EC, I'm not
sure. While this makes sense because of the delete rule---I didn't think
EOF ever did that! In fact, I'm used to having to manually remove an
object about-to-be-deleted from a relationship before deleting it, despite
the 'nullify' delete rule. My experience has been that even with the delete
rule, you've got to manually remove it yourself.
Hmm, am I doing more work than I need to? Does EOF take care of removing a
deleted object from relationships, if the delete rule is set appropriately
(nullify?). Is it supposed to?
But this give me an idea... I go back and look at my code, to see whether
in this case I was manually removing the object from the relationship. It
seems I was manually removing the about-to-be-deleted object from the
reciprocal relationship pointing to it, but I didn't use the
'removeObjectFromBothSides...' method, so I left one of the relationships
there, and the object graph in a somewhat inconsistent state. While I
wouldn't think this would result in the exception seen... who knows. I'll
fix it to use the removeObjectFromBothSides... method. Since I don't know
how to reproduce this exception, I can't really say if this will fix it or
not, but doesn't hurt.
I'll also note that when an ec raises an exception while processing deletes:
> EOClassDescription.java 478 propagateDeleteForObject
> EOCustomObject.java 688 propagateDeleteWithEditingContext
> EOEditingContext.java 2137 propagateDeletesUsingTable
> EOEditingContext.java 2099 _processDeletedObjects
That its internal state is totally trashed. To be precise it is undone
several levels too far while recovering from the exception.
Yes, I noticed that. The EC was indeed totally horked. [Have you filed a
bug on this?]
Well... this exception is just in my logs once; hopefully it won't come
back. (Yeah, right).
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.