Re: Error - lockRowComparingAttributes
Re: Error - lockRowComparingAttributes
- Subject: Re: Error - lockRowComparingAttributes
- From: "Jonathan Fleming" <email@hidden>
- Date: Thu, 16 Jan 2003 16:17:11 +0000
From: Chuck Hill <email@hidden>
To: "Jonathan Fleming" <email@hidden>,
email@hidden
Subject: Re: Error - lockRowComparingAttributes
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.
No, in that table/entity there are no time or date attributes
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.
Throughout the whole model there is no use of a precicion result
Which database are you using?
OpenBase 6.5.7 that comes with WO_5.1
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.
I am getting this which looks like an error to me (I'm not that good at
SQL), but I don't know excacly what is going on here:
Setting Category(s) to {values = {categoryName = "Tiling";
tbJobType_tbJobPictures =
"<com.webobjects.eocontrol._EOCheapCopyMutableArray 19ff91
(<EOAccessArrayFaultHandler tbJobType_tbJobPictures
_EOIntegralKeyGlobalID[TbCategory (java.lang.Long)19]>)>"; }; this =
"<TbCategory 3dd2e7 _EOIntegralKeyGlobalID[TbCategory (java.lang.Long)19]>";
}
Setting Category(s) to {values = {categoryName = "Welding";
tbJobType_tbJobPictures =
"<com.webobjects.eocontrol._EOCheapCopyMutableArray 598d00
(<EOAccessArrayFaultHandler tbJobType_tbJobPictures
_EOIntegralKeyGlobalID[TbCategory (java.lang.Long)20]>)>"; }; this =
"<TbCategory 617584 _EOIntegralKeyGlobalID[TbCategory (java.lang.Long)20]>";
}
[2003-01-16 15:46:36 GMT] <Session Timeout Thread> Could not rotate the
'/Library/WebObjects/Logs/User.log' log file into a
'/Library/WebObjects/Logs/User.log.16-01-2003-154636' back-up file.
[2003-01-16 15:46:36 GMT] <Session Timeout Thread>
<com.webobjects.appserver.WOStatisticsStore Exception occurred while saving
statistics in file '/Library/WebObjects/Logs/User.log':
com.webobjects.foundation.NSForwardException [java.io.FileNotFoundException]
\Library\WebObjects\Logs\User.log (The system cannot find the path
specified)
[2003-01-16 15:46:36 GMT] <Session Timeout Thread>
com.webobjects.foundation.NSForwardException for
java.io.FileNotFoundException: \Library\WebObjects\Logs\User.log (The system
cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at
com.webobjects.foundation._NSStringUtilities.writeToFile(_NSStringUtilities.java:474)
at
com.webobjects.appserver.WOStatisticsStore.logString(WOStatisticsStore.java:952)
at
com.webobjects.appserver.WOStatisticsStore.sessionTerminating(WOStatisticsStore.java:516)
at
com.webobjects.appserver.WOStatisticsStore._sessionTerminating(WOStatisticsStore.java:545)
at com.webobjects.appserver.WOSession.terminate(WOSession.java:470)
at
com.webobjects.appserver.WOSession._terminateByTimeout(WOSession.java:452)
at
com.webobjects.appserver.WOSessionStore$_SessionTimeoutManager.run(WOSessionStore.java:111)
at java.lang.Thread.run(Unknown Source)
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.
_________________________________________________________________
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.