abiya [
http://community.jboss.org/people/abiya] created the discussion
"Re: JNDI Lookup fails in JBoss AS 7 [java.naming.CommunicationException]"
To view the discussion, visit:
http://community.jboss.org/message/638297#638297
--------------------------------------------------------------
I am facing similar issue. Did u get a solution for this?
My datasource config in standalone.xml is as follows,
<datasource jndi-name="java:jboss/env/myds" enabled="true"
use-java-context="true" pool-name="OracleDS">
And when I try to connect from client within same instance
private static Hashtable _env;
_env.put(Context.INITIAL_CONTEXT_FACTORY,
System.getProperty("org.jnp.interfaces.NamingContextFactory"));
_env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
_env.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
_env.put(Context.SECURITY_PRINCIPAL, "");
_env.put(Context.SECURITY_CREDENTIALS, "");
ctx = new InitialContext(_env);
DataSource ds =
ctx.lookup("java:jboss/env/myds"); throws following exception,
javax.naming.NameNotFoundException: java:jboss/env/myds
Please help me resolve this.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/638297#638297]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]