JNDI Question Help Requested.

  • Thread starter Lakshmi Jagarlapudi
  • Start date
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
 
A

Anthony Borla

Lakshmi,

See my response in:
Also, please don't multi-post [i.e. send separate messages with the same
contents
to different newgroups]. Instead, cross-post [i.e. address the same message
to different newsgroups] if you feel multiple groups must see your message.

I hope this helps.

Anthony Borla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top