Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception while running applets

 
vidhyasagar reddy
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was running the game by using the applets

while running it is executing partially and showing the exception shown below. can any body tell why this exception came . did u feel it is becos of code or becos we need to set permissions explicitly for running this

***********************exception*****************************************




Exception in thread "AsyncConnector:10.10.0.37:4561" java.security.AccessControlException: access denied (java.net.SocketPermission 10.10.0.37:4561 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.sun.media.jsdt.http.TCPSocket.<init>(TCPSocket.java:73)
at com.sun.media.jsdt.http.TCPSocketFactory.createSocket(TCPSocketFactory.java:56)
at com.sun.media.jsdt.http.AsyncConnector.run(JSDTMasterSocketFactory.java:350)
at java.lang.Thread.run(Unknown Source)
Exception in thread "AsyncConnector:10.10.0.37:4561" java.security.AccessControlException: access denied (java.net.SocketPermission 10.10.0.37:4561 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.sun.media.jsdt.http.TCPSocket.<init>(TCPSocket.java:73)
at com.sun.media.jsdt.http.TCPSocketFactory.createSocket(TCPSocketFactory.java:56)
at com.sun.media.jsdt.http.AsyncConnector.run(JSDTMasterSocketFactory.java:350)
at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied (java.net.SocketPermission 10.10.0.37:4561 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.sun.media.jsdt.http.HttpSendSocket.writeNotify(HttpSendSocket.java:183)
at com.sun.media.jsdt.http.HttpSendSocket.<init>(HttpSendSocket.java:107)
at com.sun.media.jsdt.http.HttpToPortSocketFactory.createSocket(HttpToPortSocketFactory.java:55)
at com.sun.media.jsdt.http.JSDTMasterSocketFactory.createSocket(JSDTMasterSocketFactory.java:179)
at com.sun.media.jsdt.http.HttpThread.makeNewConnection(HttpThread.java:512)
at com.sun.media.jsdt.http.HttpThread.writeMessageHeader(HttpThread.java:986)
at com.sun.media.jsdt.http.NamingProxy.list(NamingProxy.java:1116)
at com.sun.media.jsdt.Naming.list(Naming.java:353)
at com.sun.media.jsdt.SessionFactory.sessionExists(SessionFactory.java:357)
at chess.ChessCanvas.connect(ChessCanvas.java:299)
at chess.ChessCanvas.setup(ChessCanvas.java:279)
at chess.ChessCanvas.<init>(ChessCanvas.java:1147)
at chess.Chess.start(Chess.java:141)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caught exception in java.security.AccessControlException: access denied (java.net.SocketPermission 10.10.0.37:4561 connect,resolve)JackUser.connect: java.security.AccessControlException: access denied (java.net.SocketPermission 10.10.0.37:4561 connect,resolve)



*************************************************************************



thx in Advance waiting for ur reply
my mail id is vidhyar@netsoftglobal.com
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the applet is not signed or otherwise specifically enabled, it can only connect to the host from where it was served. If it was not served by 10.10.0.37, then the connection is not allowed.
 
vidhyasagar reddy
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ip 10.10.0.37 is a local one . do u know how to give permissions becos i was new applets previously i was working on j2ee
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this link

http://support.sas.com/rnd/appdev/tech/signing/RSASigning.htm


it may solve ur problem
 
vidhyasagar reddy
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if it is throwing in network then it is ok but it is not at all working in the local ip it self . that's the problem
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The security issue comes when Applet comes, does not matter, ur

applet is in network or running locally...

Ur applet is somehow doing the task , that voilating the

security...Its better to sign the applet and then check

ur problem again...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic