Re: Error - lockRowComparingAttributes
Re: Error - lockRowComparingAttributes
- Subject: Re: Error - lockRowComparingAttributes
- From: Chuck Hill <email@hidden>
- Date: Wed, 15 Jan 2003 15:46:34 -0800
Another possible explanation is that you are using floating point or date /
time fields for locking. In some cases converting from the DB through the
JDBC adaptor and back again can result in a loss of precision result in
this error (i.e. the value in the WHERE clause does not exactly match the
value in the DB). I've also seen this caused by errors in JDBC drivers.
Which database are you using?
To troubleshoot this:
1. One by one, remove locking (in EOModeler) from attributes that might
suffer precision loss. Rebuild and test until the problem goes away.
2. Turn on SQL logging. Note the SQL update that is failing. Run this
directly against the database, removing one attribute at a time from the
WHERE clause. This will show which column fails to match.
Chuck
At 11:12 PM 15/01/2003 +0000, Jonathan Fleming wrote:
>>From: Art Isbell <email@hidden>
>>To: email@hidden
>>Subject: Re: Error - lockRowComparingAttributes
>>Date: Wed, 15 Jan 2003 09:51:06 -1000
>>
>>On Wednesday, January 15, 2003, at 07:07 AM, Jonathan Fleming wrote:
>>
>>>Can anyone explain why I'm getting this error? Basically when I have save
>>>an object to the database if I attempt to update it and then save it I get
>>>this error... has this got to do with locking the editingContext or
>>>something?
>>
>>>Error: com.webobjects.eoaccess.EOGeneralAdaptorException
>>>Reason: lockRowComparingAttributes --
>>>com.webobjects.jdbcadaptor.JDBCChannel: lock operation fetched row with
>>>different values than snapshot
>>>Stack trace: File Line# Method Package
>>
>> This looks like an optimistic locking error - i.e., the object updated has
>>been updated in the database by another process since you last fetched it
>>in your process. This has nothing to do with locking an editing context.
>
>So what do i do to clear it? I don't think there are any other processes
>running but then I'm not sure so how do I debug this problem? The problem
>only seems to happen when I save something and then go back to edit it and
>try to save it again. To eliminate it I have to rebuild the application and
>then the same thing happens again.
>
>Jonathan
>
>
>>
>>Art
>>http://homepage.mac.com/aisbell/
>>_______________________________________________
>>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.
>
>
>_________________________________________________________________
>The new MSN 8: smart spam protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>_______________________________________________
>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.
_______________________________________________
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.