Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need HELP on RMI w/ Exception in thread "main" java.rmi.StubNotFoundException: Stub class not found: - rmi2.zip (0/1)

3 views
Skip to first unread message

brian luk

unread,
Feb 26, 2000, 3:00:00 AM2/26/00
to
hi,
i had try to run an RMI example from "Expolring Java" but having
trouble running the client program. i use the following command.

D:\rmi>javac *.java
D:\rmi>rmic MyServer
D:\rmi>start rmiregistry
D:\rmi>java -Djava.security.policy=java.policy MyServer
bound

######### but when i run the client , it give me an exception
###########

D:\rmi>java -Djava.security.policy=java.policy MyClient 128.111.183.31
Exception in thread "main" java.rmi.StubNotFoundException: Stub class
not found:
MyClient_Stub; nested exception is:
java.lang.ClassNotFoundException: MyClient_Stub
java.lang.ClassNotFoundException: MyClient_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:280)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:275)
at java.lang.ClassLoader.loadClass(ClassLoader.java:237)
at
sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:226)
at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:103)
at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:65)
at
sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:155
)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:11
5)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:10
2)
at
java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.
java:276)
at
java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.
java:180)
at
java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:8
0)
at
java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:6
7)
at MyClient.<init>(Compiled Code)
at MyClient.main(MyClient.java:8)

D:\rmi>
################################################################

anyone know why this happen?? i am use JDK 1.2 and i have a policy
file and i had set the classpath to d:\rmi

grant {
// Allow everything for now
permission java.security.AllPermission;
};

the files are attracted in zip format too.
thankz.
-brian


0 new messages