My problem is the following: I have a Jini service whose files are jarred and signed with the private key of alias "john". At the client side, I have a policy file that grants all permissions to code signed by "john" and grant net.jini.discovery.DiscoveryPermission to all. Here is the policy file: ------------------------------------------------ keystore "jkeystore";
grant signedBy "john" { permission java.security.AllPermission; };
grant { permission net.jini.discovery.DiscoveryPermission ""; }; -------------------------------------------------
When I run the client I get the following error message.
Exception in thread "main" java.security.AccessControlException: access denied ( java.net.SocketPermission 224.0.1.84 connect,accept,resolve) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:2 70) at java.security.AccessController.checkPermission(AccessController.java: 401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:542) at java.lang.SecurityManager.checkMulticast(SecurityManager.java:1198) at java.net.MulticastSocket.joinGroup(MulticastSocket.java:267) at net.jini.discovery.LookupDiscovery$AnnouncementListener.<init>(Lookup Dis covery.java:283) at net.jini.discovery.LookupDiscovery$2.run(LookupDiscovery.java:788) at java.security.AccessController.doPrivileged(Native Method) at net.jini.discovery.LookupDiscovery.<init>(LookupDiscovery.java:785) at Client.<init>(Client.java:58) at Client.main(Client.java:147)
My two questions are the following: 1/ Why do I have this error message? 2/ To whom I must grant the net.jini.discovery.DiscoveryPermission? I don't know who need it? What other permissions my Jini applicaion needs?