OK people, that is the ninth or tenth reply to that email I've seen today, all
saying _exactly_ the same thing! You can stop replying now!
On Thu, 15 Feb 2001, you wrote:
> Ehm, Peter,
>
> > All,
> > Using JBOSS_2.0_FINAL I'm having difficulty casting
> > the results of a ejbFind* to my primary key type
> > (AccountPK). I get a 'ClassCastException: $Proxy1'.
> > Here's a code snippet:
> >
> > Collection clct = home.findByPersonsName( "Bob" );
> > for( Iterator itr=clct.iterator(); itr.hasNext; )
> > {
> > // This is where I get a class cast exception...??
> > AccountPK pk = (AccountPK) itr.next();
> > }
> >
> > The finder method on the home interface returns a
> > Collection, the ejb implementation executes the query
> > and builds a vector of AccountPK objects that contain
> > the key value return from the query statement.
> >
> > Am I doing something wrong?
>
> <Oops>
> The container returns to you a collection of remote interface, while in
> ejb<find> you have to return collections of PK.
> </Oops>
>
> Simon :)
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]