RE: SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)

2004-08-05 Thread Nathan Pierce
I am using the host that served my applet. I also already tried both, putting in localhost, as well as, putting the IP address in the code. Neither worked. I still get the same error message with one small difference. When I used the IP address, I received this error: SQLException: Unable

SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)

2004-08-04 Thread Nathan Pierce
I am trying to connect to a database which is being served off of my machine (same one I am using to connect to it). It works fine when I do- System.out.println(rs.getString(D.Name) );- and it prints it out in an application. But when I try to output it in an applet, it gives me this error:

RE: SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)

2004-08-04 Thread Sergei Skarupo
Generally applets are anly allowed to access the host that served them. Try to use the host name (localhost or whetever your machine is called) rather than the IP address, or conversely, give the IP address rather than localhost to the browser. I don't know whether applets are restiricted to