Using Sun RI server
While accessing
EJB component got different errors for diffrent code combinations
//
Context con = new InitialContext();
Object objTatto = con.lookup("Tatto");
TattoHome tattoHome = (TattoHome) PortableRemoteObject.narrow(objTatto, TattoHome.class);
//
for above code I got --->
javax.naming.NoInitialContextException: Need to specify class name in environment or system property
//
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:4848");
Context con = new InitialContext(env);
Object objTatto = con.lookup("Tatto");
TattoHome tattoHome = (TattoHome) PortableRemoteObject.narrow(objTatto, TattoHome.class);
//
for above code I got-->
javax.naming.CommunicationException: Cannot connect to ORB. Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed:
though RI is displaying bean as deployed
what is wrong exactly ....
[ April 29, 2005: Message edited by: Sandip Shinde ]