JNDI Question Help Requested.
From: Lakshmi Jagarlapudi (jlnarayana_at_comcast.net)
Date: 12/07/03
- Previous message: gnazio: "Re: need help using hsqldb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 07 Dec 2003 04:50:02 GMT
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
ry");
System.out.println("up to here it is ok ");
try{
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 --------------------
ERROR MESSAGE
----------------
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]
- Previous message: gnazio: "Re: need help using hsqldb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|