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.Co ntext;
import javax.naming.In itialContext;
import javax.naming.Na mingException;
import javax.naming.sp i.*;
import javax.naming.No InitialContextE xception;
import java.util.*;
public class jlnjndi {
public static void main(String args[]){
Hashtable env = new Hashtable();
env.put(Context .INITIAL_CONTEX T_FACTORY,"webl ogic.jndi.WLIni tialContextFact o
ry");
System.out.prin tln("up to here it is ok ");
try{
Context ctx = new InitialContext( env);
System.out.prin tln("up to here it is ok ");
Object obj = ctx.lookup("/javaprac/packages.html") ;
System.out.prin tln(" is bound to: " + obj);
} catch (NamingExceptio n e) {
System.err.prin tln("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.Na mingException: Couldn't connect to any
host [Root exception is org.omg.CORBA.C OMM_FAILURE: vmcid: SUN minor
code: 203 completed: No]
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.Co ntext;
import javax.naming.In itialContext;
import javax.naming.Na mingException;
import javax.naming.sp i.*;
import javax.naming.No InitialContextE xception;
import java.util.*;
public class jlnjndi {
public static void main(String args[]){
Hashtable env = new Hashtable();
env.put(Context .INITIAL_CONTEX T_FACTORY,"webl ogic.jndi.WLIni tialContextFact o
ry");
System.out.prin tln("up to here it is ok ");
try{
Context ctx = new InitialContext( env);
System.out.prin tln("up to here it is ok ");
Object obj = ctx.lookup("/javaprac/packages.html") ;
System.out.prin tln(" is bound to: " + obj);
} catch (NamingExceptio n e) {
System.err.prin tln("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.Na mingException: Couldn't connect to any
host [Root exception is org.omg.CORBA.C OMM_FAILURE: vmcid: SUN minor
code: 203 completed: No]