Meaningless Drivel is fun!
The moose likes Distributed Java and the fly likes java. net. Connection Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "java. net. Connection Exception" Watch "java. net. Connection Exception" New topic

java. net. Connection Exception

chetan raj
Ranch Hand

Joined: Jul 18, 2006
Posts: 34
I have an application say app1 which binds an objects at the jini lookup service
running at my server(ip= 72.36.......). The interaction between my server and my application app1
takes place through this object.
My client connect form there from there device(PDA) to the server. The server picks
the object binded at the lookup service and call some method on the app1. The app1
runs at ip(

My server is able to pick the object reference from the lookup service running on its
localhost. But when it is calling some method on app1 it is throwing the
following exceptions:
raised remote exception in connect:
connection refust to host nested exception is
connection timed out: connect

can anybody please suggest the reason for this.
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

99% of the time when you get a connect exception it is because of security.

All your applications need to specify a policy file that allows connections and everything else you want to do.

Ed's latest article: A Java Reactive Generator
chetan raj
Ranch Hand

Joined: Jul 18, 2006
Posts: 34
Yes i have policy file which grants all permission. The policy file
content are here
grant {

I have this file in correct class path . Can you please
suggest me why i still getting this error.
My applications are working well on local host. Problem
arising only when i am running my application from different
computers. One on ip 72.x.x.x. and other on 192.x.x.x
I agree. Here's the link:
subject: java. net. Connection Exception
It's not a secret anymore!