• 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
Re: Snapshot Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snapshot Question


  • Subject: Re: Snapshot Question
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 26 Apr 2007 16:29:25 -0700

Hi Andrew,


On Apr 26, 2007, at 4:14 PM, Andrew Lindesay wrote:

Hello;

I'm getting an error at...

at ..EODatabaseOperation.rowDiffsForAttributes (EODatabaseOperation.java:338)
at ..EODatabaseContext.createAdaptorOperationsForDatabaseOperationAtt ributes(EODatabaseContext.java:5373)
at ..EODatabaseContext.createAdaptorOperationsForDatabaseOperation (EODatabaseContext.java:5548)
at ..EODatabaseContext.performChanges(EODatabaseContext.java:6365)
at ..EOObjectStoreCoordinator.saveChangesInEditingContext (EOObjectStoreCoordinator.java:415)
at ..EOEditingContext.saveChanges(EOEditingContext.java:3226)

...which looks a bit like this (entity name changed)...

rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation

{_dbSnapshot = {};

That is the snapshot that it is complaining about. Notice that it has _no_ values in it. It is missing a snapshot for this object. articleBody just happens to be the first attribute it looked for. I have had this happen several times to me, it was always bad EOF locking that caused it.



_entity = "MyEntity"; _newRow =

{
...
articleBody = <com.webobjects.foundation.NSKeyValueCoding$Null>;
...
};

_object = "{values = {
...
articleBody = <com.webobjects.foundation.NSKeyValueCoding$Null>;
...
};
this = "<nz.co.chong.cbw.eo.CBClip 8e67d8 _EOIntegralKeyGlobalID [CBClip (java.lang.Integer)1637467]>"; }";
_globalID = _EOIntegralKeyGlobalID[MyEntity (java.lang.Integer) 1637467]; _databaseOperator = "EODatabaseUpdateOperator";
}


does not contain value for attribute named articleBody with snapshot key: articleBody

Which is confusing because "articleBody" seems to be there in the snap. It can't be marshalling its optimistic locking because there is none on the "articleBody" attribute. It must be looking to see if there is a change in order to turn that change into adaptor operations. I'm using...


forgetSnapshotForGlobalID(...)
recordSnapshotForSourceGlobalID(null, gidA, rA.name());

... on EODatabase as discussed some weeks ago here for change notification.

Are you locking the object store co-ordinator before doing this? EC locking is not enough here.



I'm pretty sure that I am locking the EODatabaseContext for the entity appropriately before dropping snapshots. I assume that "EOObjectStoreCoordinator" must also lock the database context before "performChanges(...)".

I think you need to lock up at the OSC level, I could be wrong.


It is highly likely that two users of the WOA are trying to edit the same data at the same time here. Anything I've obviously forgotten?

That is all that comes to mind at the moment.

Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


References: 
 >Snapshot Question (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Snapshot Question
  • Next by Date: Re: I'm killing my database
  • Previous by thread: Snapshot Question
  • Next by thread: Problems setting up wo app to consume webservices
  • Index(es):
    • Date
    • Thread