Re: recovering from a validation exception
Re: recovering from a validation exception
- Subject: Re: recovering from a validation exception
- From: Sacha Mallais <email@hidden>
- Date: Thu, 21 Apr 2005 11:53:08 -0700
On Apr 20, 2005, at 7:20 pm, Alexandre Mainville wrote:
Unless the WO or EOF framework is doing something I'm not aware of and
that is not tracable with EOAdaptorDebugEnabled, I'm certain no
changes have been made on the database (I'm the only user on a single
instance).
Ok, good.
The app already handles valid optimistic locking exceptions gracefully
by warning the user and refaulting.
Here is the exception I get:
I'm not too familiar with the eodistribution framework. I was
expecting a EOGeneralAdaptorException.
java.lang.IllegalStateException: Server exception: Optimistic locking
failure: The object with global ID _EOIntegralKeyGlobalID[Test
(java.lang.Integer)1] has been changed by another client
at
com.webobjects.eodistribution.client.EODistributedObjectStore._checkRet
urnValuesForExceptions(EODistributedObjectStore.java:565)
at
com.webobjects.eodistribution.client.EODistributedObjectStore._send(EOD
istributedObjectStore.java:593)
at
com.webobjects.eodistribution.client.EODistributedObjectStore.saveChang
esInEditingContext(EODistributedObjectStore.java:423)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.
java:3148)
at temp.client.temp.saveChanges(temp.java:29)
at
com.webobjects.eoapplication.EODocumentController._saveIfUserConfirms(E
ODocumentController.java:670)
at
com.webobjects.eoapplication.EODocumentController.save(EODocumentContro
ller.java:617)
Is this the first such object in your app? The PK of 1 is a little
suspicious.
I'm afraid I'm out of my area of expertise here. Try posting the SQL
that gets generated: optimistic locking failures normally only occur if
the database has changed, but maybe this problem is something more
directly related to JavaClient.
HTH,
sacha
--
Sacha Michel Mallais - 800 lb. gorilla
Global Village Consulting Inc.: http://www.global-village.net/
ObAd: read "Practical WebObjects" <fnord>
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