Hi!
Kevin Lewis wrote:
> Thanks for the response, Rickard.
>
> So it seems reasonable that my PortableRemoteObject.narrow would be
> going through com.sun.corba.se.internal stuff?
>
> I checked my classes, and I think they match on both sides.
Do this: when you get the object from the JNDI lookup, print out the
following:
System.out.println(obj.getClass().getInterfaces()[0].getClassLoader());
and
System.out.println(theRemoteInterface.class.getClassLoader());
and see if they match.
/Rickard
>
> > -----Original Message-----
> > From: Rickard �berg [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 10, 2000 11:26 AM
> > To: jBoss
> > Subject: Re: [jBoss-User] ClassCastException
> > atcom.sun.corba.se.internal...
> >
> >
> > Hi!
> >
> > Kevin Lewis wrote:
> > >
> > > In August, Werner Ramaekers reported a problem exactly like
> > I'm having
> > > now.
> > >
> > > When I do a PortableRemoteObject.narrow from Tomcat (using the
> > > TomcatService), I get a class cast.
> > >
> > > The object I'm casting is the result of a JNDI lookup. It
> > reports to be
> > > of type "$Proxy7", but implements the interface to which I
> > am casting (I
> > > printed them out), so I'm thinking the lookup is correct.
> > >
> > > Does anyone know what I am doing wrong to get this problem?
> >
> > Most likely a classloader problem: the interface to the bean is
> > available in two places, and the proxy uses one and your
> > client code the
> > other. This will give you these types of problems.
> >
> > /Rickard
> >
> > --
> > Rickard �berg
> >
> > Email: [EMAIL PROTECTED]
> > http://www.telkel.com
> > http://www.jboss.org
> > http://www.dreambean.com
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
> >
> >
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]