Re: java.lang.ClassCastException
Re: java.lang.ClassCastException
- Subject: Re: java.lang.ClassCastException
- From: Henrique Prange <email@hidden>
- Date: Mon, 29 Sep 2008 15:39:19 -0300
Hi Gustavo,
java.lang.ClassCastException: Empleado
at controlHorarios.app.eo._Empleado.fetchEmpleado(_Empleado.java:220)
Are you sure the Empleado class is in the right package? Do you have
more than one Empleado class? For example, one into default package and
another into controlHorarios.app.eo? Have you tried a full project clean
before the application execution?
Cheers,
Henrique
WebObjects wrote:
Sure here it is.
I dunno what can be happening, im kind of new.
Regards
Gustavo
On Sep 29, 2008, at 1:12 PM, Henrique Prange wrote:
Hi Gustavo,
Please, could you provide the entire stack trace?
Cheers,
Henrique
WebObjects wrote:
Hello well, im following the Wonder intro part 1 podcast, doing
something similar, I had everything ready, wehn I enter a wrong
username it pops up the error, but, when I enter a valid username
this comes out.
*Application:* ControlHorarios
*Error:* java.lang.ClassCastException:
com.webobjects.eocontrol.EOGenericRecord
*Reason:* com.webobjects.eocontrol.EOGenericRecord
I have this in the code:
try {
EOQualifier qual =
Empleado.E_MAIL.eq(email).and(Empleado.PASSWORD.eq(password));
emp =
Empleado.fetchRequiredEmpleado(session().defaultEditingContext(), qual);
System.out.println(emp.nombre()+" y con pass "+emp.password());
this.errorMessage = "Success";
} catch (NoSuchElementException e) {
this.errorMessage ="EMail o Contrase–a Erroneos";
}catch (Exception e){
//TODO
System.out.println(emp.nombre()+" y con pass "+emp.password());
}
if I coment the last cacth is wehen the error appears, but if I don't
comment it, then nothing happens, actually what I see is that i
can't even reach the line to put the "Success" Message. its going
directly to the catch.
Any clue??
Regards
Gustavo
------------------------------------------------------------------------
_______________________________________________
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
_______________________________________________
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