Hi, I'm using Sun J2EE Reference Implementation server. The following
program results
javax.naming.NameNotFoundException although the ejb/greeter component
is accessible from JSP environment.

import java.util.*;
import javax.naming.*;
public class jndi_test {
public static void main(String args[]) {
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory")
;
env.put("java.naming.provider.url","iiop://localhost:1050");
try{
InitialContext initContext = new InitialContext(env);
Object objref = initContext.lookup("java:comp/env/ejb/greeter");
}
catch(Exception ex)
{ System.out.println( ex); }
}
}

What do I wrong? Thanks for any help