aspose file tools*
The moose likes Distributed Java and the fly likes RMI: ClassNotFoundException: Impl_Stub Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI: ClassNotFoundException: Impl_Stub" Watch "RMI: ClassNotFoundException: Impl_Stub" New topic
Author

RMI: ClassNotFoundException: Impl_Stub

Ilya PA
Greenhorn

Joined: Sep 05, 2001
Posts: 15
Hi,
THis is a very nasty problem that i'm having... Was looking through groups here and there the whole evening and already feeling sick of RMI. Please somebody help. The problem that i'm fighting here is following: I seem to be unable to bind the remoteInterfaceImlementation to the RMI registry. I'll describe in more detail what i was doing...
1)I run WinXP on my machine with J2SDK1.4.0
2)I've written a simple to the core RMI program, that has an Interface, InterfaceImplementation, RemoteClient and a RemoteServer, and stored it in the 'C:\RMIExample' folder
3)My actions to run it step by step, where specified above directory is set as the current one:
1.>javac *.java
2.>rmic InterfaceImplementation
3.>SET CLASSPATH=
4.>rmiregistry
5.>SET CLASSPATH=c:\RMIExample
6.>java -Djava.rmi.server.codebase=file:/C:\RMIExample/ -Djava.security.policy=java.policy RemoteServer
And this is the place where the nasty error pops up, saying:
java.lang.ClassNotFoundException: InterfaceImplementation_Stub
I had problems getting the explanation of the sun website(http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html), They only mentioned a bit about it...

Thanks heaps for your time and help!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
It looks like you don't have your classes in a package. If so, put them in a package and try again.
Bill
Naveen Sampra
Ranch Hand

Joined: Jun 11, 2003
Posts: 70
Could you explain how putting all classes in a package will help.

I have the exact same problem as explained in the first post above. I tried using package, but am continuing to get the annoying ClassNotFoundException.

Could someone please help.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Try changing your codebase property to -


it needs the three slashes between the protocol and the address, and you shouldn't mix forward- and back-slashes


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI: ClassNotFoundException: Impl_Stub