On Jan 28, 2008, at 12:19 PM, Chris Hoyt wrote:

One of my applications has started throwing errors due to stale data. such as:

Error: com.webobjects.eoaccess.EOGeneralAdaptorException exception
Reason:
com.webobjects.eoaccess.EOGeneralAdaptorException: lockRowComparingAttributes -- com.webobjects.jdbcadaptor.JDBCChannel: lock operation failed to select any rows

EOF should not be locking rows at all. That it is indicates a problem in the model, code, or prototypes.


and

java.lang.IllegalStateException: cannot update primary-key 'assignmentID' form '52067' to '52067' on object

What you can't see there is that one of those 52067 is an Integer and one is a Long (or a BigDecimal or some class other than what the first one is.


I have had these problems before and they are always related to old cached data, I have gotten around them in the past with editingContext.refetch(); and now I am trying editingContext.refaultAllObjects();

Is there a better way to force data to refresh?

Those errors are not from state data.  Somethings that can cause this:

1. Different value types on the PK and FK side of relationships in the model

2. Incorrect jdbc2info in the connection dictionary

3. Recently fixed bug in FrontBasePlugIn.framework in Wonder that can affect you if you are using Long primary keys.

WO version?  Database?  WebApp?  JavaClient?  Details?

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to