• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with executing RMI Client Adder

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a following rmi code from internet. Server is compiled and running but client is giving error in execution (java.rmi.NotBoundException: Adder).

The interface code is:

==
And the code of class implementing the interface(Adder.java) is given below:


==
And the code for AddServer.java is:

==
The code for Client  (Client. Java)is:

==
The code for policy file is:


List of all files:


Compilation:
I am able to compile all these files:


No problem with starting registry and server


However when I am executing Client.java, I am getting following error:

Some body please guide me.

Zulfi.
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's been an extremely long time since I had to set up an RMI connection by hand. However you have these two lines of code:





My guess is that they are designed to configure the connection between the client and the server? If that's the case then shouldn't they use the same name?
 
Paul Clapham
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way RMI isn't a beginning Java topic so I moved your post out of the Beginning Java forum. (If you're really a beginner you might want to reconsider the idea of studying RMI until you get more experience.)
 
Zulfi Khan
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul Clapham,
you are right. Client should search the registry using "AddService" string. I changed my client code and now its running.



Next time i would follow your advice regarding use of appropriate forum. I have a feeling that begginer's forum get more response. Can we post on multiple forums??

Zulfi.
 
Zulfi Khan
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i forgot to show the output:



Thanks. God bless you.

Zulfi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic