L
Lakshmi Jagarlapudi
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
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