Deos anyone know why this happened to me

Please help!

loading chat.rmi.RMIServer.class for debugging...

chat.rmi.RMIServer.class successfully loaded

java.rmi.StubNotFoundException: Stub class not found: chat.rmi.RMIServer$RemoteLogonManager_Stub; nested exception is:

java.lang.ClassNotFoundException: chat.rmi.RMIServer$RemoteLogonManager_Stub

java.lang.ClassNotFoundException: chat.rmi.RMIServer$RemoteLogonManager_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:296)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

at java.lang.ClassLoader.loadClass(ClassLoader.java:253)

at sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:198)

at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:100)

at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:62)

at sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:155)

at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:115)

at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:102)

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:80)

at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:67)

at chat.rmi.RMIServer$RemoteLogonManager.<init>(RMIServer.java:23)

at chat.rmi.RMIServer.<init>(RMIServer.java:16)

at chat.rmi.RMIServer.main(RMIServer.java:11)

at symantec.tools.debug.Agent.runMain(Native Method)

at symantec.tools.debug.MainThread.run(Unknown Source)

The communications channel closed.

[1980 byte] By [sojag] at [2007-9-26 1:40:51]
# 1
Can you post the offending code?
GLJdotcom at 2007-6-29 2:31:45 > top of Java-index,Archived Forums,Java Programming...
# 2

Hi,

This happens because you did not create stub or skeleton, or it cannot able to find out the stub and skeleton class.

For eg.

Win32:

cd c:\home\ann\src

javac engine\ComputeEngine.java

rmic -d . engine.ComputeEngine

mkdir c:\home\ann\public_html\classes\engine

cp engine\ComputeEngine_*.class

c:\home\ann\public_html\classes\engine

UNIX:

cd /home/ann/src

javac engine/ComputeEngine.java

rmic -d . engine.ComputeEngine

mkdir /home/ann/public_html/classes/engine

cp engine/ComputeEngine_*.class

/home/ann/public_html/classes/engine

The -d option tells the rmic compiler to place the generated class files, ComputeEngine_Stub.class and ComputeEngine_Skel.class, in the directory c:\home\ann\src\engine. You also need

to make the stubs and the skeletons network accessible, so you must copy the stub and the skeleton class to the area: public_html\classes.

Since the ComputeEngine's stub implements the Compute interface, which refers to the Task interface, you need to make these two interface class files network accessible along with the

stub. So the final step is to unpack the compute.jar file in the directory c:\home\ann\public_html\classes to make the Compute and the Task interfaces available for downloading.

Also please refer this URL which says how to compile the RMI programs.

http://java.sun.com/docs/books/tutorial/rmi/compiling.html

Please refer the URL which says how to run the RMI programs

http://java.sun.com/docs/books/tutorial/rmi/running.html

I hope this will help you.

Thanks

Bakrudeen

bakrudeen_indts at 2007-6-29 2:31:45 > top of Java-index,Archived Forums,Java Programming...