So Weird EOF exception
So Weird EOF exception
- Subject: So Weird EOF exception
- From: Jonathan Rochkind <email@hidden>
- Date: Wed, 23 Jul 2003 13:07:50 -0500
Okay. I now AM properly locking all my ECs. And the following set of
exceptions just has to do with session.defaultEditingContext()s anyway,
which should be locked for me. So I don't think this is a locking problem.
I'm not sure if I can reproduce this or not, this is from my logs. But
check this out:
1. User1 in Instance1 invokes an action. That action has a bug in it---I'm
not sure why or how it's doing this, but this isn't the baffling part. But
the user gets an exception: IllegalStateException: recordInsertForObject:
com.webobjects.eoaccess.EODatabaseContext@4d921a found a snapshot for EO
with Global ID:_EOVectorKeyGlobalID[PersonMailRecord
(java.lang.Integer)37457,(java.lang.Integer)1850] that has been inserted
into
com.webobjects.eocontrol.EOEditingContextcom.webobjects.eocontrol.EOEditingContext@e0edb.
Cannot insert an object that is already in the database
Even though I don't entirely understand what's going on, this isn't my
question. I don't properly recover from this exception, and thus I'd expect
that session.defaultEditingContext() to be wonky from here on out. That's
not my question.
Here's my question:
2. A _different_ user, in a different session, but in the SAME instance,
dealing with, I'm pretty sure, that same object that raised on exception in
part 1, now gets this following exception. This is the real problem, that I
think indicates a bug in EOF somewhere... but I'm not sure how to report
it. But I'm pretty sure it's caused by what happened in #1. Nothing that
happened in #1 should be able to mess up an entirely different session like
this, should it? Wait, looking through the lengthy stack trace, I think I
understand what's going----the saveChanges in session2 caused a
notification to be sent to the EC in session1, and because the EC in
session1 was somehow left in a corrupt state.... it threw an exception
upon receiving the notification.
Okay.... but I'm still not sure whether to consider this an EOF bug or
not. And I'm not sure how I'm _supposed_ to properly recover from the
exception in #1, so that the corrupt EC hanging around wont' cause
exceptions be thrown when completely different ECs try to do things!
java.lang.IllegalStateException
attempt to refault an object that was inserted into this context
EOEditingContext.java 3927 refaultObject
EOEditingContext.java 3424 _newChangesFromInvalidatingObjectsWithGlobalIDs
EOEditingContext.java 3462 _processObjectStoreChanges
Method.java NA invoke
NSSelector.java 354 invoke
NSSelector.java 108 _safeInvokeSelector
EOEditingContext.java 4649 _sendOrEnqueueNotification
EOEditingContext.java 3502 _objectsChangedInStore
Method.java NA invoke
NSSelector.java 120 _safeInvokeMethod
NSNotificationCenter.java 598 invokeMethod
NSNotificationCenter.java 542 postNotification
NSNotificationCenter.java 572 postNotification
EOObjectStoreCoordinator.java 740 _objectsChangedInSubStore
Method.java NA invoke
NSSelector.java 120 _safeInvokeMethod
NSNotificationCenter.java 598 invokeMethod
NSNotificationCenter.java 542 postNotification
NSNotificationCenter.java 572 postNotification
EODatabaseContext.java 3793 _snapshotsChangedInDatabase
Method.java NA invoke
NSSelector.java 120 _safeInvokeMethod
NSNotificationCenter.java 598 invokeMethod
NSNotificationCenter.java 542 postNotification
NSNotificationCenter.java 572 postNotification
EODatabaseContext.java 6515 commitChanges
EOObjectStoreCoordinator.java 421 saveChangesInEditingContext
EOEditingContext.java 3130 saveChanges
_______________________________________________
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.