I am trying to lookup JBoss ports through this client Program
Context ctx = new InitialContext(env);
System.out.println(b.getName() + " Object is -> " + b.getObject());
On Executing this i am getting Exception:::::
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1199 and discovery failed with error: java.security.AccessControlException: access denied (java.net.SocketPermission 18.104.22.168 connect,accept,resolve) [Root exception is javax.naming.CommunicationExcepti
on: Failed to connect to server localhost:1199 [Root exception is java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1199 connect,resolve)]]
if anyone knows the answer then do let me no please
i think you should do two things:
1. check for service running at the URL
2. modify the policy file. by default this file gives full pemission but in your case it may have been changed.
thanks for your feedback
Can you please tell me which is the policy file for JBoss and where it is located
thanks and regards
Well JBoss need not have its own policy file. It can use the default file of installed JRE which is found at %JRE_HOME%\jre\lib\security\java.policy.
If you want to override it, you can define your own policy file. Please refer java giude for that purpose.