Access control exception
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yanis_Manaras
Posted On:   Wednesday, March 17, 2004 11:23 PM

Hi, I would be gratefull if you could help me with the following problem. I have developed a 3-tier application with Java and CORBA. When the client Applet runs on the server's PC everything runs OK, but when the Applet runs on another PC I get the following exception: java.security.AccessControlException: access denied (java.net.SocketPermission Develop 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.InetAddress.getAllByName0(Unknown So   More>>

Hi,



I would be gratefull if you could help me with the following problem.


I have developed a 3-tier application with Java and CORBA. When the client Applet runs on the server's PC everything runs OK, but when the Applet runs on another PC I get the following exception:

			
java.security.AccessControlException: access denied (java.net.SocketPermission Develop 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.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.Socket. (Unknown Source)



I have to mention, that I have created a ".java.policy" file
which is supposed to give the necessary access right to the applet (i.e.:

grant { permission java.security.AllPermission "DBApplet"; };


)


Any idea, what I am doing wrong?


Cheers,


Yanis

   <<Less

Re: Access control exception

Posted By:   Mark_Stewart  
Posted On:   Sunday, March 28, 2004 09:36 AM

Yes, each JVM has its own policy file, you have modified your local policy, so when you run it on your machine it works, however when another user on another machine runs the same applet, their policy file does not contain the grant. Policy files affect only the JVM for which they are responsible, changing the policy file on the server does not distribute that back to the connecting client, for obvious reasons.
About | Sitemap | Contact