Re: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext in _globalIDForObject
Re: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext in _globalIDForObject
- Subject: Re: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext in _globalIDForObject
- From: David Avendasora <email@hidden>
- Date: Wed, 18 Feb 2009 17:46:57 -0500
Hi Bill,
Is it possible that there are objects that aren't in _any_
EditingContext? Created but not inserted? That can cause some really
crazy stuff.
Dave
On Feb 18, 2009, at 5:19 PM, Bill Gallop wrote:
Hello all,
We're seeing this really weird behaviour in our applications from
time to time. At this point, we haven't found any way to reproduce
it - it's intermittent, but when it happens, fetches from/saves to
the database all bail and the application needs to be restarted.
Our suspicion is some sort of a race condition, but from what I can
see from poking around inside EOF this stuff is supposed to be
single threaded. What's strange is that all of the objects involved
are in the _same_ editing context.
This is a Wonder-ized application running as a servlet with
concurrent request handling and auto-locking turned on.
[2/18/09 9:22:30:975 MST] 0000008d SystemOut O 3251000
[WebContainer : 5] INFO er.transaction.adaptor.Exceptions -
Database Exception occured: java.lang.IllegalStateException: Cannot
obtain globalId for an object which is registered in an other than
the databaseContext's active editingContext, object:
<com.xyz.zzyz.model.Page pk:"1">, databaseContext:
er.extensions.eof.ERXDatabaseContext@20212021, object's
editingContext: er.extensions.eof.ERXEC@77317731, databaseContext's
active editingContext: er.extensions.eof.ERXEC@62d162d1
[2/18/09 9:22:30:975 MST] 0000008d SystemOut O [2009-2-18
9:22:30 MST] <WebContainer : 5> Commit failed on data source of type
class er.extensions.eof.ERXDatabaseContext
[2/18/09 9:22:30:976 MST] 0000008d SystemOut O [2009-2-18
9:22:30 MST] <WebContainer : 5> java.lang.IllegalStateException:
Cannot obtain globalId for an object which is registered in an other
than the databaseContext's active editingContext, object:
<com.xyz.zzyz.model.Page pk:"1">, databaseContext:
er.extensions.eof.ERXDatabaseContext@20212021, object's
editingContext:er.extensions.eof.ERXEC@77317731, databaseContext's
active editingContext: er.extensions.eof.ERXEC@62d162d1
at
com
.webobjects
.eoaccess
.EODatabaseContext._globalIDForObject(EODatabaseContext.java:4660)
at
com
.webobjects
.eoaccess
.EODatabaseContext.databaseOperationForObject(EODatabaseContext.java:
4767)
at
com
.webobjects
.eoaccess.EODatabaseContext.valuesForKeys(EODatabaseContext.java:6535)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.valuesForKeys(EOObjectStoreCoordinator.java:326)
at com.webobjects.eoaccess.EOQualifierSQLGeneration
$
_KeyValueQualifierSupport
.schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:439)
at er.extensions.ERXExtensions
$
KeyValueQualifierSQLGenerationSupport
.schemaBasedQualifierWithRootEntity(ERXExtensions.java:305)
at com.webobjects.eoaccess.EOQualifierSQLGeneration
$
Support
._schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:
179)
at
com
.webobjects
.eoaccess
.EODatabaseChannel
.selectObjectsWithFetchSpecification(EODatabaseChannel.java:227)
at
com
.webobjects
.eoaccess
.EODatabaseContext
._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:
3055)
at
er
.extensions
.eof
.ERXDatabaseContext
._objectsWithFetchSpecificationEditingContext
(ERXDatabaseContext.java:57)
at
com
.webobjects
.eoaccess
.EODatabaseContext
.objectsWithFetchSpecification(EODatabaseContext.java:3195)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
at
com
.webobjects
.eocontrol
.EOEditingContext
.objectsWithFetchSpecification(EOEditingContext.java:4069)
at
er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1114)
at
com
.webobjects
.eoaccess
.EODatabaseContext.objectsForSourceGlobalID(EODatabaseContext.java:
4084)
at
er
.extensions
.eof
.ERXDatabaseContext.objectsForSourceGlobalID(ERXDatabaseContext.java:
40)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.objectsForSourceGlobalID(EOObjectStoreCoordinator.java:634)
at
com
.webobjects
.eocontrol
.EOEditingContext.objectsForSourceGlobalID(EOEditingContext.java:3923)
at er.extensions.eof.ERXEC.objectsForSourceGlobalID(ERXEC.java:
1070)
at
com
.webobjects
.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseContext.java:
4245)
at
com
.webobjects
.eoaccess
.EOAccessArrayFaultHandler
.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
at
com
.webobjects
.eocontrol
._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:45)
at
com
.webobjects
.eocontrol
._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:103)
at
com.webobjects.foundation.NSArray.containsObject(NSArray.java:666)
at
com
.webobjects
.eocontrol
.EOCustomObject.includeObjectIntoPropertyWithKey(EOCustomObject.java:
904)
at
er
.extensions
.eof
.ERXGenericRecord
.includeObjectIntoPropertyWithKey(ERXGenericRecord.java:1192)
at com.xyz.zzyz.model._Page.addToClientPageCompletes(_Page.java:
130)
at sun.reflect.GeneratedMethodAccessor783.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at
com
.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:
122)
at
com
.webobjects
.eocontrol
.EOCustomObject.addObjectToPropertyWithKey(EOCustomObject.java:940)
at
com
.webobjects
.eocontrol.EOEditingContext._mergeValueForKey(EOEditingContext.java:
660)
at
com
.webobjects
.eocontrol
.EOEditingContext._mergeObjectWithChanges(EOEditingContext.java:3457)
at
com
.webobjects
.eocontrol
.EOEditingContext._processObjectStoreChanges(EOEditingContext.java:
3546)
at sun.reflect.GeneratedMethodAccessor219.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:
358)
at
com
.webobjects
.foundation.NSSelector._safeInvokeSelector(NSSelector.java:110)
at
com
.webobjects
.eocontrol
.EOEditingContext._processNotificationQueue(EOEditingContext.java:
4741)
at
com.webobjects.eocontrol.EOEditingContext.lock(EOEditingContext.java:
4620)
at er.extensions.eof.ERXEC.lock(ERXEC.java:480)
at
com
.webobjects.eocontrol.EOEditingContext.tryLock(EOEditingContext.java:
4632)
at
com
.webobjects
.eocontrol
.EOEditingContext._sendOrEnqueueNotification(EOEditingContext.java:
4705)
at
com
.webobjects
.eocontrol.EOEditingContext._globalIDChanged(EOEditingContext.java:
2038)
at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at
com
.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:
122)
at com.webobjects.foundation.NSNotificationCenter
$_Entry.invokeMethod(NSNotificationCenter.java:588)
at
com
.webobjects
.foundation
.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at
com
.webobjects
.foundation
.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
._globalIDsChangedInSubStore(EOObjectStoreCoordinator.java:698)
at sun.reflect.GeneratedMethodAccessor618.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at
com
.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:
122)
at com.webobjects.foundation.NSNotificationCenter
$_Entry.invokeMethod(NSNotificationCenter.java:588)
at
com
.webobjects
.foundation
.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at
com
.webobjects
.foundation
.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
at
com
.webobjects
.eoaccess.EODatabaseContext.commitChanges(EODatabaseContext.java:6377)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.saveChangesInEditingContext(EOObjectStoreCoordinator.java:386)
at
com
.webobjects
.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
...
cheers
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden