help with an exception when trying to establish a socket connection


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: help with an exception when trying to establish a socket connection

  1. #1
    Join Date
    Feb 2003
    Posts
    15

    help with an exception when trying to establish a socket connection

    i am trying to make a chat (using an applet for the client).......
    it uses an simple socket connection between the server and clients.....when i connect the client to address 127.0.0.1 or localhost everything works fine, but when i try to connect the client to my DNS name or ip, i get an exception....the exception reads:

    java.security.AccessControlException: access denied (java.net.SocketPermission nextwave.dyndns.org resolve)

    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)

    at java.security.AccessController.checkPermission(AccessController.java:401)

    at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)

    at java.net.InetAddress.getAllByName0(InetAddress.java:937)

    at java.net.InetAddress.getAllByName0(InetAddress.java:918)

    at java.net.InetAddress.getAllByName(InetAddress.java:912)

    at java.net.InetAddress.getByName(InetAddress.java:832)

    at java.net.InetSocketAddress.<init>(InetSocketAddress.java:109)

    at java.net.Socket.<init>(Socket.java:119)

    at Client.<init>(Client.java:42)

    at ClientApplet.init(ClientApplet.java:12)

    at sun.applet.AppletPanel.run(AppletPanel.java:347)

    at java.lang.Thread.run(Thread.java:536)

    wat is this all about??????
    i'm not that fluent in java or networking at that, but i'm sure there is something i can do to fix this......
    any help would be greatley appreciated.
    Linux?!?!?!
    What is that, something to eat?

    "All things being equal, the simplest solution tends to be the best."
    Acham's Razor

  2. #2
    Join Date
    Mar 2003
    Posts
    32
    I think the problem would be that you have a firewall, if so, then try to change the settings to allow connections on the port you are using for the chat program. If that failes, try disabling the firewall completely to make sure that it works. If you don't have a firewall, then i'm not sure what the problem is. Hope this helps.

    - Master Of Souls

  3. #3
    Join Date
    Feb 2003
    Posts
    15
    thank you for your reply.......
    i do have a firewall (software) as well as a linksux router....
    however i checked with someone on the sun forum, and they explained what the problem was (my applet isn't signed).....i have decided, being so much hastles to sign the applet, that i will be using an executable .jar file to be placed on the client's machine......
    once again i thank you for your advice.
    Linux?!?!?!
    What is that, something to eat?

    "All things being equal, the simplest solution tends to be the best."
    Acham's Razor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center