File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java. net. Connection Exception

 
chetan raj
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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(192.168.0.107).

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 192.168.0.107 nested exception is java.net.ConnectionException:
connection timed out: connect

can anybody please suggest the reason for this.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
chetan raj
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i have policy file which grants all permission. The policy file
content are here
grant {
permission java.security.AllPermission;
};

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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic