• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 27 Dec 2004 16:51:43 -0800

ERROR - [2004-12-25 17:13:02 EST] <WorkerThread4> com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database

Is an optimistic locking failure. Are you running multiple instances? If so, the login was processed on different instances and they have different views of the data in the database. One is stale. See refreshing on www.wodev.com or in Practical WebObjects.

Chuck


On Dec 27, 2004, at 12:44 PM, Nathan Dumar wrote:

I hope everyone had a good Christmas (or holidays, for other faiths).

Yet another error occurs in deployment and not in development, but I have some clues this time.

Here's what I'm doing in code:

The user record/object has a field for the session ID. When logging in, my code expires the session if a session ID is found:

if ( (String)theUser().userSession() != null ) {
this.application().sessionStore().removeSessionWithID((String)theUser() .userSession());
// does nothing if session object for the session ID no longer exists
}


Then it records the current session ID:

theUser().setUserSession((String)this.session().sessionID());
ec().saveChanges(); // ec() returns this.session().defaultEditingContext();




This works great, allowing each user to be logged in only once, but not blocking them from logging in if they simply close the window and forget to log out (logging out removes the session ID from the record and expires the session).


When deployed, however, the following error is thrown at the line ec().saveChanges() above:


ERROR - [2004-12-25 17:13:02 EST] <WorkerThread4> com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database
at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContext InformationAdded(EODatabaseContext.java:4676)
at com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseCont ext.java:6384)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingC ontext(EOObjectStoreCoordinator.java:415)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext. java:3165)
at Main.verifyUser(Main.java:54)
... <snip>




This only occurs when I attempt to log the same user in twice in a row. Doing this should (and does in development) get the existing session ID in the user object/record, expire it, set the new ID in the user object/record, then save.

I've been looking at the docs at the methods listed in the error, but have not yet come up with anything definitive, so ... What could be causing this? How can I fix it?

Thank you for any help.

Nathan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development 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


  • Follow-Ups:
    • Re: multiple instances
      • From: Nathan Dumar <email@hidden>
References: 
 >(no subject) (From: Nathan Dumar <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: multiple instances
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: multiple instances
  • Index(es):
    • Date
    • Thread