the INITIAL_CONTEXT_FACTORY, is not correct :
you must use:
com.evermind.server.ApplicationClientInitialContextFactory
and all the j2ee client structure ........applicaltion-client.xml etc...
ciao
Paolo
Antonio Vazquez wrote:
Hi all,I'm trying to write an applet that connects to an EJB in Orion. With the following code:
public void init()
{
try
{
Hashtable env = new Hashtable();// Get the context
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(javax.naming.Context.PROVIDER_URL, "ormi://myserver/myapp");
env.put(javax.naming.Context.SECURITY_PRINCIPAL, "admin");
env.put(javax.naming.Context.SECURITY_CREDENTIALS, "123");Context context = new InitialContext(env);
// Now look up the bean
Object boundObject = context.lookup("java:comp/env/ejb/mybean");
I receive the following error:Opening http://myserver/myapp/com/sun/jndi/url/java/javaURLContextFactory.class with cookie "JSESSIONID=IBPKBCADNFEM".java.lang.SecurityException: Invalid username/password for myapp () at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._np(Unknown Source) at com.evermind._ce._np(Unknown Source) at com.evermind.server.rmi.RMIContext.lookup(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at EjbAppletRMI.init(EjbAppletRMI.java:53) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Can anybody tell me what's the problem?Username and password are correct, so why the Orion server couldn't validate it?
Thanks in advance.Antonio
begin:vcard n:ramasso;paolo x-mozilla-html:FALSE adr:;;;;;; version:2.1 email;internet:[EMAIL PROTECTED] fn:paolo ramasso end:vcard