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

(no subject)


  • Subject: (no subject)
  • From: Nathan Dumar <email@hidden>
  • Date: Mon, 27 Dec 2004 15:44:39 -0500

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._exceptionWithDatabaseContextI nformationAdded(EODatabaseContext.java:4676)
at com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseConte xt.java:6384)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo ntext(EOObjectStoreCoordinator.java:415)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.j ava: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:
This email sent to email@hidden


  • Follow-Ups:
    • Adding Third Party Java Class Files
      • From: Janice Cheung <email@hidden>
    • Re: (no subject)
      • From: Chuck Hill <email@hidden>
    • Re: (no subject)
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Cannot obtain globalId for an object which is not registered in any editingContext
  • Next by Date: Re: Cannot obtain globalId for an object which is not registered in any editingContext
  • Previous by thread: Re: WebObjects PU
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread