It's not a secret anymore!
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes with RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark " with RMI" Watch " with RMI" New topic
Author with RMI

Yupp Cook
Ranch Hand

Joined: Feb 07, 2006
Posts: 49
Hi all!

Need some help with this:
I ve got 3 MSDOS prompt windows. In the first rmiregistry is running. On starting the server it throws a ConnectException, see below. I correctly created the Stub and Skel classes. THE SAME APP RUNS ON ANOTHER COMPUTER WITHOUT PROBLEM, the client prints out "hello world" after starting the server the exact same way. What can be the problem? Can the ConnectException depend on DSL routing problems?

D:\sourcen\certification>java suncertify.server.ServerBS
java.rmi.ConnectException: Connection refused to host:; nested exception is: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at suncertify.server.ServerBS.main(
Caused by: Connection timed out: connect
at Method)
at Source)
at Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 7 more

Thanx for quick help.

SCJP 1.4<br />SCJD (BS2.1.2)
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
You should be using Registry.createRegistry(1099) in the first place. You want the examiner to execute simply
java -jar runme.jar.
I agree. Here's the link:
subject: with RMI
It's not a secret anymore!