• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
weird EOF exception in propagateDeleteWithEditingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

weird EOF exception in propagateDeleteWithEditingContext


  • Subject: weird EOF exception in propagateDeleteWithEditingContext
  • From: Jonathan Rochkind <email@hidden>
  • Date: Wed, 27 Aug 2003 13:47:51 -0500

Man, since I've improved my unhandled exception logging, and started considering all these unhandled exceptions problems that need to be solved, I run into all sorts of mysterious stuff.

This situation is complicated to even explain what's going on. But it involves an unflattened many-to-many relationship. In fact, I am seeing this exceptoin logged with two completely different sets of entities in such a relationship, from different parts of my code. Just for simplicity, let's call it Department and Employee, with a JoinDepartmentEmployee join table.

I delete a Department. I save changes. Of course propagateDeleteForEditingContext is called on the Department. Which, because of the cascade rule on JoinDepartmentEmployee, deletes that join object. Which itself has a 'nullify' rule on it's destination, Employee. So, of course, EOF tries to call destinationEmployee.removeFromDeptJoinObjects( theDeletedJoinObject ).

But this raises a NullPointerException. Apparently Employee.deptJoinObjects() is returning null, instead of an array containing that join object (or an empty array for that matter!). Note that I still have the old 5.0-generated code for removeFromRelationship, which is why the stack trace points me to a null pointer exception that I know is from deptJoinObjects() returning null.

Huh? If you're with me still... any idea at all? I'm stumped. I can not reproduce this, I just see it in my logs. It strikes me that it wouldn't hurt to replace my relationship manipulating code with the new 5.2-style stuff using includeObjectIntoPropertyWithKey and excludeObjectFromPropertyWithKey . But I don't know if that's going to solve the problem, or just move the exception to a different place. It also strikes me that improper cross-editing context relationships _could_ be responsible----I don't know why I think this, perhaps just because I do use local ECs, and I know that often causes problems. I suppose I'll put some code into the relevant relationship modifying methods that throws an exception if the argument is from an improper editing context, so at least I'll know when that's happening.

Any other ideas at all?

--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.

  • Prev by Date: Re: 4.5 question - _holdMe array trick
  • Next by Date: Compound PKs
  • Previous by thread: Re: EOF inheritance?
  • Next by thread: Re: weird EOF exception in propagateDeleteWithEditingContext
  • Index(es):
    • Date
    • Thread