You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Saman Ghodsian <gs...@shaw.ca> on 2003/06/10 09:57:56 UTC

Problem retrieving class

Hi there,

It's late and I've been trying to do this for a while so I'll just post
this message hoping I get a reply in the morning....


I have a class structure, everything works fine when I store the objects
in DB, but after doing a select and trying to cast the object to my type
I get a classCastException

i.e 

Account acc = (Account) result.get(0);


Any ideas? Thanks 

Sam


RE: Problem retrieving class

Posted by Saman Ghodsian <gs...@shaw.ca>.
Found the problem..... After sleeping a couple of hours .... :-/

The issue was that I defined dynamic proxy in my repository.xml so it
was retrieving a proxy instead of my own class.....
Now I have to do some more reading on proxies......

Thanks for the replies

Sam



-----Original Message-----
From: Armin Waibel [mailto:armin@code-au-lait.de] 
Sent: Tuesday, June 10, 2003 1:32 AM
To: OJB Users List
Subject: Re: Problem retrieving class


Good morning Sam,

please could you post more info?
OJB version?
Example code (with select)?
class structure of Account?
stack trace?

We aren't clairvoyants. Maybe your
problem blow over after sleeping ;-)

regards,
Armin

----- Original Message -----
From: "Saman Ghodsian" <gs...@shaw.ca>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Tuesday, June 10, 2003 9:57 AM
Subject: Problem retrieving class


> Hi there,
>
> It's late and I've been trying to do this for a while so I'll just
post
> this message hoping I get a reply in the morning....
>
>
> I have a class structure, everything works fine when I store the
objects
> in DB, but after doing a select and trying to cast the object to my
type
> I get a classCastException
>
> i.e
>
> Account acc = (Account) result.get(0);
>
>
> Any ideas? Thanks
>
> Sam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problem retrieving class

Posted by Armin Waibel <ar...@code-au-lait.de>.
Good morning Sam,

please could you post more info?
OJB version?
Example code (with select)?
class structure of Account?
stack trace?

We aren't clairvoyants. Maybe your
problem blow over after sleeping ;-)

regards,
Armin

----- Original Message -----
From: "Saman Ghodsian" <gs...@shaw.ca>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Tuesday, June 10, 2003 9:57 AM
Subject: Problem retrieving class


> Hi there,
>
> It's late and I've been trying to do this for a while so I'll just
post
> this message hoping I get a reply in the morning....
>
>
> I have a class structure, everything works fine when I store the
objects
> in DB, but after doing a select and trying to cast the object to my
type
> I get a classCastException
>
> i.e
>
> Account acc = (Account) result.get(0);
>
>
> Any ideas? Thanks
>
> Sam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



Re: Problem retrieving class

Posted by Alen Ribic <al...@mweb.co.za>.
I've got the same problem on this one.
I get the exception in the tag <logic:iterate/>

Would love to now how to over come it.
I haven't look at it since last night but I will get a chance sometime
today. (maybe I'll find out what the problem is, myself :))

--Alen


----- Original Message -----
From: "Saman Ghodsian" <gs...@shaw.ca>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Tuesday, June 10, 2003 9:57 AM
Subject: Problem retrieving class


> Hi there,
>
> It's late and I've been trying to do this for a while so I'll just post
> this message hoping I get a reply in the morning....
>
>
> I have a class structure, everything works fine when I store the objects
> in DB, but after doing a select and trying to cast the object to my type
> I get a classCastException
>
> i.e
>
> Account acc = (Account) result.get(0);
>
>
> Any ideas? Thanks
>
> Sam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>


Re: Problem retrieving class

Posted by Alen Ribic <al...@mweb.co.za>.
oops.
Sorry everyone.
I didn't read the TO address. I thought it was struts mailing list. (I guess
I didn't read the post well either)

excuse my previous post. :)
--Alen


----- Original Message -----
From: "Saman Ghodsian" <gs...@shaw.ca>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Tuesday, June 10, 2003 9:57 AM
Subject: Problem retrieving class


> Hi there,
>
> It's late and I've been trying to do this for a while so I'll just post
> this message hoping I get a reply in the morning....
>
>
> I have a class structure, everything works fine when I store the objects
> in DB, but after doing a select and trying to cast the object to my type
> I get a classCastException
>
> i.e
>
> Account acc = (Account) result.get(0);
>
>
> Any ideas? Thanks
>
> Sam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>