aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes using LocateRegistry.getRegistry(), Exception 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 "using LocateRegistry.getRegistry(), Exception" Watch "using LocateRegistry.getRegistry(), Exception" New topic
Author

using LocateRegistry.getRegistry(), Exception

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Yesterday, after reading a lot of posts here at JavaRanch, I got rmi with suncertify.db classes to work. Found posts here that were discussing getRegistry(). Seemed like the thing to do. But no, I get thrown a RemoteException: "Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect". Tried with -Djava.rmi.server.hostname=127.0.0.1, same thing. I'm using sdk 1.4.1 and 2 machines, both running Win 2000. Please help me sort this out.
Thanks in advance
Cheers
Torgny
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
hi torgny,
i have this line in my server class to create the registry
LocateRegistry.createRegistry(this.port_no);
i am binding this server object to the registry without having implemented the security manager and with security manager both.

harcharan
parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
Hi torgny,
it seems you have got security problem not rmi registry problem ..
if you are instatiating a security manager inside your code comment it out.
hope this helps,
cheers,
parthi.


Even crazy and silly looking problems are sometimes real.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Thx for the quick response.
I thought that after 2 hours with this it was time to ask. Looking thru the replies and... well sometimes I wonder, it was my stupid mistake
. If I use createRegistry instead of getRegistry it works like a charm.
Cheers
Torgny
parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
hahaha
welcome to the head crackers club
right now am cracking my head goin hmmm now how do i make that dialog appear on the center of the screen no matter what the resolution is .. any idea
cheers
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
That one's on me
About the dialog, seems to much for FBN, I would position it inside the parent frame and then remember where the user moved and resized it.
/T
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
hi prathiban
this should work for you
dialog.setLocationRelativeTo(frame);
harcharan
parthiban subramaniam
Ranch Hand

Joined: May 15, 2002
Posts: 116
thnx harcharan... that sure does the trick

cheers
 
wood burning stoves
 
subject: using LocateRegistry.getRegistry(), Exception