*_Stub not found, no security manager
843793Jul 11 2001 — edited Sep 19 2001Hello,
I"m running into a slight problem with RMI. I'm trying to run RMI as an NTService, I'm currently using jsrvany. My server creates an rmiregistry on port 1099 then tries to register one object within that registry. The rmiregistry is created fine, but once rebind is called, it throws an exception :
java.lang.ClassNotFoundException: <the stub class> (no security manager: RMI class loader disabled)
I'm not quite sure what the problem is. If i start the rmi registry by hand, and don't create it within my code the problem goes away. And I make sure that the rmi registry is not in a dir where the class files can be found. I'm setting java.rmi.server.codebase to the file url where the jar that has the stubs is located. I also set java.rmi.server.StubClassBase to the same jar, and in my classpath, that jar is there also.
Checked to see if the file url is incorrect by creating a url and calling getContent, and it was located fine.
I'm not sure what to do now. It seems like either the classloader is not finding the class correctly or there is a security problem, but the system vars seem to be set up correctly. Any thoughts?
thanks for your help.
-brett