Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.rmi.NotBoundException:

 
Rob Brew
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I'm getting the above error message. Rmiregistry is running, and i've run rmic on the Sever class, MyRemoteImpl.

Code is below: where am i going wrong?


Server:



Cleint:
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know, but I shall try duplicating this query in the “remote” forum in the hope of attracting more attention.

[edit]The forum is called “distributed” not “remote”[/edit]
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is the

lines?
and on client side

server DOES NOT NEED Naming.rebind();

Hope this works. Otherwise post a reply.

-Supun
 
Rob Brew
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still having problems:


Server side:


When the server is running with the changes you suggested.

Thanks,
Rob.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50258
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our remote distributed Java forum.
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Brew wrote:Still having problems:


Server side:


When the server is running with the changes you suggested.

Thanks,
Rob.


Did you run the server first?
need more details.
please post entire exceptions.(stackTrace)
or
please email your project to supunlakshan.071@gmail.com

I promise that i WILL NOT publish your project.

-Supun
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your whole program has this format?
To test this just copy and save them with provided class name (hope you get what i meant).

Common - both server and client needs this class

Server Side - Only Server needs these two classes RemoteObject, ServerMainClass


Client Side - Only Client needs these two classes ServerConnector, ClientMainClass



You may implement the programme as you wish.

First run ServerMainClass
Then run ClientMainClass.

You will get following on Client console
"Successfully Invoked Method1"

You will get following on Server console
"Successfully Invoked Method3"
"Successfully Invoked Method2"

Hope this will help

-Supun
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got your mail and fixed it.
here is your code

here is the solution


The error was in for-loop in go() method.

in your for loop 2nd execution Socket clientSocket = serverSock.accept(); line waits for another Client.

so it won't execute


block. that means server is NOT started.

It is equals to you run the client first instead of server.

So palace above code before for loop and Replace with fixed the problem
 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 135
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you still have problems, feel free to contact me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic