I am trying to lookup JBoss ports through this client Program
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL,"jnp://localhost:1199");
env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interface");
Context ctx = new InitialContext(env);
NamingEnumeration bl=(NamingEnumeration)ctx.listBindings("");
while(bl.hasMore()){
Binding b=(Binding)bl.next();
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 230.0.0.4 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
-
Problem with Remote Lookup in JBoss (3 messages)
- Posted by: deep singh
- Posted on: January 03 2006 09:22 EST
Threaded Messages (3)
- url and policy file by shreenee josh on January 04 2006 07:22 EST
- Info Required by deep singh on January 08 2006 23:39 EST
- use installed JRE policy file. by shreenee josh on January 09 2006 05:53 EST
- Info Required by deep singh on January 08 2006 23:39 EST
-
url and policy file[ Go to top ]
- Posted by: shreenee josh
- Posted on: January 04 2006 07:22 EST
- in response to deep singh
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.
cheers,
shrini -
Info Required[ Go to top ]
- Posted by: deep singh
- Posted on: January 08 2006 23:39 EST
- in response to shreenee josh
Hi Srini
thanks for your feedback
Can you please tell me which is the policy file for JBoss and where it is located
thanks and regards
Deep Singh -
use installed JRE policy file.[ Go to top ]
- Posted by: shreenee josh
- Posted on: January 09 2006 05:53 EST
- in response to deep singh
Hi Deep,
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.
cheers,
shrini