Hello,
The problem is like this,
If the remote interface is something like this,
HelloHome home = ................................
Enumeration enum = (Enumeration)
PortableRemoteObject.narrow(home.findByID(id), HelloBean.class);
Here the finder method returns enumeration, but narrow is trying to cast
that to HelloBean.
so change the code as,
Enumeration enum = (Enumeration) home.findById(Id) );
while(enum.hasNextElement())
{
HelloBean hello =
PortableRemoteObject.narrow(enum.nextElement() , HelloBean.class);
}
Warm Regards,
Deepa Annamalai
Virtusa (Pvt) Ltd.,
3rd Floor, My Home Tycoon,
Begumpet,
Hyderabad, AP
India - 500 016.
+91-40-3414200 ext 135/136
[EMAIL PROTECTED]
-----Original Message-----
From: wonder sonic [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 10:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] ClassCastException at
PortableRemoteObject.narrow
Well I can't login and go to the url at the same time
(problem with my Internet Explorer version)...
Could you do that?
--- Marius Kotsbak <[EMAIL PROTECTED]> a �crit�: >
You need an account at sourceforge.net.
>
> Then go to sourceforge.net/projects/jboss and select
> bugs
>
> On Fri, 2002-05-31 at 17:22, wonder sonic wrote:
> > Well, if someone want to tell me how I can do
> that,
> > I'll do it...
> >
> > I really don't understand where does it come... :(
> > And with local interfaces?
> >
> > --- Marius Kotsbak <[EMAIL PROTECTED]> a �crit :
> > I
> > also join :-(
> > >
> > > Is it reported as a bug with top priority?
> > >
> > > On Fri, 2002-05-31 at 17:00, wonder sonic wrote:
> > > > Welcome to the club :)
> > > > If you look to old mails, we have discussint
> about
> > > > this problem, search the subject "[JBoss-user]
> > > [HELP]
> > > > Is there someone to help me?"
> > > >
> > > > If you find a solution, tell me :)
> > > >
> > > > Wonder Sonic
> > > >
> > > > --- Steve Knight <[EMAIL PROTECTED]> a
> �crit
> > > : >
> > > > Hello,
> > > > > I just updated my JBoss from 3.0 beta2 to
> RC3
> > > and
> > > > > now I am getting this
> > > > > error:
> > > > >
> > > > > java.lang.ClassCastException
> > > > > at
> > > > >
> > > >
> > >
> >
>
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemo
> > > > > teObject.java:296)
> > > > >
> > > > > Here is the line that is giving me problems:
> > > > >
> > > > > PersonnelManagerHome pmHome =
> > > > >
> > >
> (PersonnelManagerHome)PortableRemoteObject.narrow(
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ic.lookup(
> PersonnelManagerHome.JNDI_NAME
> > > > > ),PersonnelManagerHome.class);
> > > > >
> > > > > Where PersonnelManagerHome.JNDI_NAME =
> > > > > "PersonnelManager" as generated by
> > > > > XDoclet.
> > > > > The very same code worked fine on beta2.
> > > Everything
> > > > > in my ear appears to
> > > > > have deployed properly.
> > > > > Am I missing something obvious?
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Steve
> > > > >
> > > > >
> > > >
> > >
> >
>
_______________________________________________________________
> > > > >
> > > > > Don't miss the 2002 Sprint PCS Application
> > > > > Developer's Conference
> > > > > August 25-28 in Las Vegas --
> > > > > http://devcon.sprintpcs.com/adp/index.cfm
> > > > >
> > > > >
> _______________________________________________
> > > > > JBoss-user mailing list
> > > > > [EMAIL PROTECTED]
> > > > >
> > > >
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > > >
> > > >
> > >
> >
>
___________________________________________________________
> > > > Do You Yahoo!? -- Une adresse @yahoo.fr
> gratuite
> > > et en fran�ais !
> > > > Yahoo! Mail : http://fr.mail.yahoo.com
> > > >
> > > >
> > >
> >
>
_______________________________________________________________
> > > >
> > > > Don't miss the 2002 Sprint PCS Application
> > > Developer's Conference
> > > > August 25-28 in Las Vegas --
> > > http://devcon.sprintpcs.com/adp/index.cfm
> > > >
> > > >
> _______________________________________________
> > > > JBoss-user mailing list
> > > > [EMAIL PROTECTED]
> > > >
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > >
> > >
> > >
> >
>
_______________________________________________________________
> > >
> > > Don't miss the 2002 Sprint PCS Application
> > > Developer's Conference
> > > August 25-28 in Las Vegas --
> > > http://devcon.sprintpcs.com/adp/index.cfm
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> >
> >
>
___________________________________________________________
> > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite
> et en fran�ais !
> > Yahoo! Mail : http://fr.mail.yahoo.com
> >
> >
>
_______________________________________________________________
> >
> > Don't miss the 2002 Sprint PCS Application
> Developer's Conference
> > August 25-28 in Las Vegas --
> http://devcon.sprintpcs.com/adp/index.cfm
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
>
_______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application
> Developer's Conference
> August 25-28 in Las Vegas --
> http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user