wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes RMI sever setup problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI sever setup problem" Watch "RMI sever setup problem" New topic
Author

RMI sever setup problem

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2229
    
    7

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 JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2229
    
    7

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.
 
 
subject: RMI sever setup problem
 
Similar Threads
ClassCastException with RMI
Help with RMI - newbie :cool:
My RMI server not running properly
Data class and server code
Exception: Connection refused to host