Vijay, I guess some thing may wrong in the Initial context look-up. Here what you did env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory"); env.put (Context.PROVIDER_URL, "iiop://localhost:3700");
please look for the port number 3700 is correct? did you use default port while creating your domain? or did you mention 3700?
usually default would be 7001 ..so try with that if you want to..
I am positive about the iiop port. I went to the Application Server's General Tab in the admin gui, and that was where I found that 3700 was the port. Basically, I am using J2EE 1.4 and SDK 1.5. Can that be any reason?