• 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

problem in rmi  RSS feed

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to use rmi on local host so i made three things first myremote interface:





2.) myremoteimpl class:








3.)and my remoteclient class :





i first compiled all classes ,then i used rmic to extract stub class from my myremoteimpl(it doesnt gave me skeleton class out); and then in other console started rmiregistry, and then started myremoteimpl.java , so that the server is up . but it gave me javamalformedexeption: invalid url string, what is the reason, i double checked all the things but couldnt resolve the problem.
please help


[NK: Please UseCodeTags]
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not done RMI in years so decided to try it. I was able to compile your code and reproduce your error. I removed the space between "Remote" and "Hello" as in the following code: and the error went away (actually it was replaced by another error but that's my problem :-). If you absolutely need the space then try using java.net.URLEncoder.
 
deepak kushwaha
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks tom for your reply, but this time when i removed the spaces and try to run rmi registry its giving me java.rmi.server.ExportExeption : listen failed on port 1099 , i cant understand what is the problem
 
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you shutdown the rmiregistry before you tried to start it again??

The code works if the space is removed - without any new errors.

 
deepak kushwaha
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rene Larsen wrote:Did you shutdown the rmiregistry before you tried to start it again??

The code works if the space is removed - without any new errors.



hey!! thanks it worked !!!
 
deepak kushwaha
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but let say i want to register my service by the name "Remote Hello" with spaces, what should i do???
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you absolutely need the space then try using java.net.URLEncoder.

 
deepak kushwaha
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i cant understand how to use that. i am not able to understand what this method saying. i mean i am unable to read the documentation.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example:
 
deepak kushwaha
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!