Hi!

Kevin Lewis wrote:
> > Well, as long as you run the NamingService (where "comp" is
> > created, as
> > you can see) before you try to use it in Tomcat, that should be fine.
> 
> Yeah, it is.
> 
> Current problem:
> 
> I am able to do a lookup at this point (and I think it finds the correct
> object), but I get an infamous (to me) class cast because the class
> loader for my interface (to which I am casting the object) is an
> AdaptiveClassLoader and the class loader for the object I'm getting back
> from JNDI is an instance of sun.rmi.server.LoaderHandler$Loader:
> 
> java.lang.ClassCastException
>         at
> com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Portable
> RemoteObject.java:296)
>         at
> javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
> 
> I'm getting further, but more and more stumped!

Hm.. did you remember to set the right contextclassloader before looking
up the object in JNDI at init time?

Can you send me the code, and I'll check myself.

regards,
  Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


Reply via email to