• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Dynamic downloading of stubs

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is anyone downloading the server stub from the server machine.
I am running into unmarshal exception and it is unable
to find the stub classes.
When I have the stubs on the client side, it runs fine.
I am setting the java.rmi.server.codebase property, unless
I am doing it the wrong way. Further it seems to be able to
locate the policy file. Has any one run
into similar problems.
[This message has been edited by Narayan Veeramani (edited July 11, 2001).]
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ensure that when you start the rmiregistry you do so such that its classpath is undefined.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Narayan,
Here are a few checkpoints to pinpoint possible sources of error:
1.) Ensure that the java.rmi.server.codebase property is set in the command line for the SERVER (not needed in the CLIENT). On a windows machine it must take the following form:
-Djava.rmi.server.codebase=file:///c:/ahkhan/myapp/server.jar
(note the tripple '/' after file ) In the example above i used executable jar files if you're using the raw files in directories then you SHOULDN'T just put the directory in which the file is located. Rather specify the directory off which it can be found using the full class specifier (e.g. if suncertify.server.RemoteServer is in directory c:/scdj/src/suncertify/server then specify c:/scdj/src as the codebase)
2.) Generatae stubs and ensure that the stub classes are in the same directory as the UnicastRemoteObject class when you run the server.
3.) Make sure the class files above are within the CLASSPATH of the server and not in the class path of the client.( You can save yourself a lot of problems with CLASSPATH's if you stick to using executable jar files)
If the only error you're getting is what you've mentioned then these will correct that error. If you haven't properly defined the policy file then you'll probably get some new security exceptions.
Hope this will help.
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 12, 2001).]
 
Narayan Veeramani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Akanimo and Doug for your feedback. I am planning on making these changes and see whether it works.
 
Their achilles heel is the noogie! Give them noogies tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic