By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

JNDI Question Help Requested.

P: n/a
Hi ,

I wrote the following program and compiled and I was getting the error
pasted below. Can anyone throw some light as to why it is happening.
Thanks in advance

----- START OF THE PROGRAM --------------------
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.spi.*;
import javax.naming.NoInitialContextException;
import java.util.*;

public class jlnjndi {
public static void main(String args[]){
Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic. jndi.WLInitialContextFacto

System.out.println("up to here it is ok ");


Context ctx = new InitialContext(env);

System.out.println("up to here it is ok ");

Object obj = ctx.lookup("/javaprac/packages.html");
System.out.println(" is bound to: " + obj);

} catch (NamingException e) {
System.err.println("Problem looking up " + e);
} // end of the catch stmt

} // end of the main method

} // end of the class
----- END OF THE PROGRAM --------------------
Problem looking up javax.naming.NamingException: Couldn't connect to any
host [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor
code: 203 completed: No]
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.