• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java. net. Connection Exception

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic