I have successfully deployed the
EJB under /myserver/ directory, but when I try to run the client program the following error is reported :
javax.Naming.NoIniitialContextException : Need to specify class name in one or system property or as an
applet parameter or in application resource
My client program is given below
import java.util.Properties;
import trial.*;
import javax.naming.*;
import java.rmi.*;
public class Client
{
public static void main(
String s[])
{
try
{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.InitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
p.put(Context.SECURITY_PRINCIPAL,"");
p.put(Context.SECURITY_CREDENTIALS,"");
InitialContext ic = new InitialContext(p);
HelloHome home = (HelloHome)ic.lookup("trial.HelloHome");
Hello hel = home.create();
System.out.println("Msg from server...:" + hel.sayHello("Apt"));
hel.remove();
}catch(Exception e){e.printStackTrace();}
}
}
Please help me out in solving the problem
Thanx in Advance
Roshini