Re: More Info on Error
Re: More Info on Error
- Subject: Re: More Info on Error
- From: Chuck Hill <email@hidden>
- Date: Sun, 05 Jan 2003 22:13:29 -0800
I'm a little confused as to why you have Person_C and Users. Is Users a
sub-class of Person_C?
Also it seems wrong to make a new guest user for every anonymous login.
Why not just make one and reuse it?
Finally, you should call insertObject(eo) before setting any values on eo.
Chuck
At 05:58 AM 06/01/2003 +0000, Riaz Lalehzari wrote:
>Hello again,
>
>This might help. I found where in my code the exception is happening:
>
> public boolean verifyLogin() {
>
> String validUser = "no";
> EOEditingContext ec = new EOEditingContext();
>
> // Create "guest" user, if not yet defined
> try
> { //Java Class Name of
>entity, key for the query, Value to look for
> guest = (Person_C)
>EOUtilities.objectMatchingKeyAndValue(ec,"Users","username", "guest");
> }
> catch (EOObjectNotAvailableException exception1) //if this person
>does not exist then make a guest user
> {
>********** guest = new Person_C(); //FINE UP TO HERE
>*!*!*!*!** guest.setUsername("guest"); //!!! EXCEPTION IS TRIGGERED
>HERE!!!!
>
> .......
> }
>}
>This is the class with the 'setUsername' method in it:
>
>public class Person_C extends EOCustomObject {
> public Person_C()
> {
>
> }
>
> ...
>
> public void setUsername(String value) {
> takeStoredValueForKey(value, "username");
> }
>}
>
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 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.