hi
i have written a small basic code in java following j2ee architecture. Read the following few lines :-
Properties h = new Properties();
System.out.println("B4 INITIALCONTEXTFACTORY");
//h.put(Context.INITIALCONTEXTFACTORY,"org.jboss.naming.HttpNamingContextFactory");
h.put(Context.INITIALCONTEXTFACTORY,"org.jnp.interfaces.NamingContextFactory");
h.put(Context.PROVIDERURL, "localhost:8080/Student/");
System.out.println("AFTER INITIALCONTEXT_FACTORY");
System.out.println("AFTER URL");
InitialContext context = new InitialContext(h);
System.out.println("AFTER context"+h.values());
Object obj = context.lookup("StudentHome");
System.out.println("AFTER lookup");
home=(StudentHome) PortableRemoteObject.narrow(obj,StudentHome.class);
home=(StudentHome) PortableRemoteObject.narrow(obj,StudentHome.class);
System.out.println("AFTER home");
It gives me following error :-
org.apache.jasper.JasperException: Naming Exception: Exception thrown when tryingto look up Student EJB : StudentHome not bound
I dont know really how to configure web.xml or any similar files if reqd.
Plz help.
-jay
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).