This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI sever setup problem

 
K. Tsang
Bartender
Posts: 3440
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I'm new to RMI and have the following code so far. All code are in package server




When I run I get the following error:
java.rmi.ConnectException: Connection refused to host: <my ip address>; nested exception is:
java.net.ConnectException: Connection refused: connect

Now if I start rmiregistry - which I don't think I need to I get the following:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: server.DBRemote

My concern is are my interface, implementation class (RemoteData), and server class set up properly???

Any help is recommended. Thanks.
 
K. Tsang
Bartender
Posts: 3440
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I kinda figured it out. I changed line from

LocateRegistry.getRegistry();

to line

LocateRegistry.createRegistry(1099);

and now I don't have the exceptions I got eariler. But now when I run, it just completes the program giving me the command prompt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic