You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Havanki, Bill (NCI)" <ha...@mail.nih.gov> on 2000/12/20 18:26:29 UTC

ClassCastException when receiving RMI stub

I have a servlet which looks up a remote object over RMI.
The line of code that does it looks like this:

RemoteInterface remoteObject =
  (RemoteInterface) Naming.lookup ("rmi://localhost:1099/RemoteObjectName");

Under Tomcat 3.2, this triggers a ClassCastException.
According to the exception, the right stub class is being
returned by the RMI registry.

Under Tomcat 3.1, no exception is raised ... it works fine!
Am I missing something? Has anyone else experienced this
problem?

Thanks in advance,
Bill