• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic