I should be more explicit. I make a call to the following code and get the logs below:
public boolean authenticateUser(String userId, String encPassword) throws ServiceException { xLogger.fine("Entering authenticateUser"); PersistenceManager pm = PMF.get().getPersistenceManager(); //We use an atomic transaction here to check if the user exists and then update it try { //First check if the user already exists in the database UserAccount user = pm.getObjectById(UserAccount.class, userId); xLogger.info("authenticateUser: Authenticating user {0}", userId); //If we get here, it means the user exists //If the user account is disabled, then always fail authentication if (!user.isEnabled()) { xLogger.warn("authenciateUser: FAILED!! User {0} is disabled", userId); throw new ServiceException("User is disabled"); } //TODO: Encode password if (encPassword == user.getEncodedPassword()) { user.setTimeStamp(new Date()); pm.close(); xLogger.fine("Exiting authenticateUser"); xLogger.info("authenticateUser: User authenticated successfully"); return true; } } catch (JDOObjectNotFoundException e) { xLogger.warn("authenciateUser: FAILED!! User {0} does not exist", userId); throw new ServiceException("User does not exist"); } xLogger.fine("Exiting authenticateUser"); xLogger.warn("authenticateUser: FAILED!! Incorrect password for user {0}", userId); throw new ServiceException("Incorrect password"); } FINE: Entering authenticateUser Aug 26, 2009 6:01:07 PM org.datanucleus.state.LifeCycleState changeState FINE: Object "org.lggi.samaanguru.entity.useracco...@5d5f30" (id="org.lggi.samaanguru.entity.UserAccount:user1") has a lifecycle change : "HOLLOW"->"P_NONTRANS" Aug 26, 2009 6:01:07 PM org.datanucleus.ConnectionManagerImpl allocateConnection FINE: Connection added to the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1be8bba Aug 26, 2009 6:01:07 PM org.datanucleus.ConnectionManagerImpl allocateConnection FINE: Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1be8bba Aug 26, 2009 6:01:07 PM org.lggi.samaanguru.utils.XLog log WARNING: authenciateUser: FAILED!! User user1 does not exist On Aug 26, 10:50 pm, swprog <juheeg...@gmail.com> wrote: > After persisting the object, I try to get the object and it fails. > > try { > xLogger.fine("Authenticating user 1"); > AccountsServiceImpl as = Services.get().getService( > AccountsServiceImpl.class); > as.authenticateUser("user1", "user1"); > xLogger.fine("user authenticated successfully"); > return true; > } catch (ServiceException e) { > e.printStackTrace(); > > return false; > } > > I get a JSOObjectNotFoundException when I run this.... > > On Aug 26, 10:35 pm, datanucleus <andy_jeffer...@yahoo.com> wrote: > > > > > > However, the object is not able to persist. > > > Define "not able to persist". You quote no exception. You quote no > > datastore info. The log says that the object persists. The object > > moves into the correct lifecycle state for a persisted object. There > > is no error.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---