Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI: ClassNotFoundException: Impl_Stub

 
Ilya PA
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic