Click to See Complete Forum and Search --> : RMI: "UnmarshallException"...stub class not found


capuccino
May 9th, 2000, 10:19 PM
I have both the client and the server on the same machine and the same directories.(including the stub and skeleton.Even then when i run the server program ,i get the error "java.rmi.UnMarshallException :stub class not found.(something like that)".Pl help me with this.

kib63613
May 10th, 2000, 02:24 AM
You may consider the path that reference to the stub class. For example, suppose that you have the
implementation class file Test.ImplRMI.class . Your root directory is c:\RMI. In this directory, you may
see the subdirectory Test, that is, c:\RMI\Test. In the subdirectory c:\RMI\Test, you need put the your
implementation class and stub, and skeleton class files You may also have the interface class file, say
IntfRMI.class and register RMI class file , say, RegRMI.class which is used to register the RMI server
with the rmiregistry. You may have them with the same package name , say, Test. The simple case is
to put Test.ImplRMI.class, stub and skeleton class of Test.ImplRMI.class, Test.IntfRMI.class,
Test.RegRMI.class in the directory c:\RMI\Test. After ready, you may run the rmiregistry program
in the root directory c:\RMI, and run the Test.RegRMI.class like this
java -Djava.security.policy=test.polcyfile Test.RegRMI
test.policyfile is the security policy file which is put in the root directory c:\RMI in this case. You may
also try java Test.RegRMI directly. I've forgotten what may happen. It might work or fail.
good luck,
Alfred Wu