This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Stub class not found but its THERE

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a bare bone RMI program.
It all works fine when i use local host IE 127.0.0.1.
But now I'm testing it on a server.
I get java.lang.ClassNotFoundException on my Stub class. Even though its in the directory.
When I compiled i did javac -classpath . *.java
than created the stub from implementation file.. IE rmic -v1.2 ClassImpl
I than seperated my files into server and client (placed in sep folders)
uploaded to the server
ran rmiregistry 5544 which is the port i'm using
executed the server file and thats when i get the error of the stub not found.
Any help is appreciated.
Regards, Jacob
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again just a guess... But as far as I understand it, your problem could be due to one of two things...
1. You haven't set the codebase property correctly - forgotten the trailing /
2. I quote "Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry, either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.
If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object."
 
Jacob Hoda
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply.
The problem is that I was supposed to run RMIREGISTRY on the server directory. I did not do that. I ran it on the main directory. It all works well now thank you for taking your time in replying to my message.
Jacob
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!