S
Subramanian.ganesh
Hi,
I searched the entire web, Still couldn't solve the problem. Seems many
are facing the same problem.
The following are the sample codes from sun's site. I'm using J2ee
server in WinXp.
Context jndiContext = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://hydws0060:8080");
try {
jndiContext = new InitialContext(env);
} catch (NamingException e) {
System.out.println("Could not create JNDI API context: " +
e.toString());
System.exit(1);
}
ConnectionFactory connectionFactory = null;
Destination dest = null;
try {
connectionFactory =
(ConnectionFactory)
jndiContext.lookup("jms/ConnectionFactory");
dest = (Destination) jndiContext.lookup(destName);
} catch (Exception e) {
System.out.println("JNDI API lookup failed: " +
e.toString());
e.printStackTrace();
System.exit(1);
}
While executing this program, I'm receiving an exception
"Could not create JNDI API context:
javax.naming.CommunicationException: Request: 1 cancelled"
I followed all the steps as given in the tutorial.
Thanks in Advance,
Ganesh
I searched the entire web, Still couldn't solve the problem. Seems many
are facing the same problem.
The following are the sample codes from sun's site. I'm using J2ee
server in WinXp.
Context jndiContext = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://hydws0060:8080");
try {
jndiContext = new InitialContext(env);
} catch (NamingException e) {
System.out.println("Could not create JNDI API context: " +
e.toString());
System.exit(1);
}
ConnectionFactory connectionFactory = null;
Destination dest = null;
try {
connectionFactory =
(ConnectionFactory)
jndiContext.lookup("jms/ConnectionFactory");
dest = (Destination) jndiContext.lookup(destName);
} catch (Exception e) {
System.out.println("JNDI API lookup failed: " +
e.toString());
e.printStackTrace();
System.exit(1);
}
While executing this program, I'm receiving an exception
"Could not create JNDI API context:
javax.naming.CommunicationException: Request: 1 cancelled"
I followed all the steps as given in the tutorial.
Thanks in Advance,
Ganesh