Hello,
I wrote an Application Client, which calls a session bean in WebSphere Studio Application Developer. It runs successfully in Studio and I can even call a session bean of a WebSphere server.
Now i tried to export the Application Client and run it without Studio. I'm getting Naming Exception when trying to get the InitialContext. Here is the code:
public static void main(
String[] args) {
javax.naming.Context jndiContext = null;
Object obj = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:900");
try {
jndiContext = new javax.naming.InitialContext(env);
} catch (javax.naming.NamingException ne) {
System.out.println("Can't get InitialContext");
}
Any suggestions?