You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Sergey V. Udaltsov" <se...@clients.ie> on 2001/03/06 23:55:55 UTC

RMI: part2

So, finally I decided to grant all permission (at least, till Tomcat
will handle permissions properly or Sam will find out how to tune
tomcat.policy:)

Now, I tried to run my servlet (RMI client).

I get the ClassCastException. My *_Stub is loaded by RMI properly with
all its base classes and interfaces and - there are two interfaces: one
loaded by sun.rmi.****Loader and another - by AdaptiveClassLoader (by
Tomcat). These two classes are absolutely independent, from the JVM's
point of view and ... ClassCastException is raised.

**stub class: class SPbTU.DLS.Server.Protocol.ClientProtocolImpl_Stub
loaded by sun.rmi.server.LoaderHandler$Loader@341960
**remote interface from local classpath: interface
SPbTU.DLS.Protocol.ClientProtocol loaded by AdaptiveClassLoader(  )
**stub class implements remote interface: false
**remote class with all its supers and interfaces
class SPbTU.DLS.Server.Protocol.ClientProtocolImpl_Stub loaded by
sun.rmi.server.LoaderHandler$Loader@341960
   implements interface SPbTU.DLS.Protocol.ClientProtocol loaded by
sun.rmi.server.LoaderHandler$Loader@341960
   implements interface SPbTU.DLS.Protocol.Protocol loaded by
sun.rmi.server.LoaderHandler$Loader@341960
   implements interface java.rmi.Remote loaded by null
extends class java.rmi.server.RemoteStub loaded by null
extends class java.rmi.server.RemoteObject loaded by null
   implements interface java.rmi.Remote loaded by null
   implements interface java.io.Serializable loaded by null
extends null!

Any ideas? I suspect there is something wrong with
AdaptiveClassLoader...

Regards,

Sergey