Hi all,
Eversince I started using Weblogic since January this year I'm having trouble with logging into it.
When logging in I create an InitialContext on the client giving:
Hashtable hash = new Hashtable();
hash.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
hash.put(Context.SECURITY_PRINCIPAL, "foo");
hash.put(Context.SECURITY_CREDENTIALS, "bar");
Context ctx = new InitialContext(hash);
Usually there's no problem, however sometimes this client logs in as user 'guest'.
I have no idea why. I've reported this to BEA long ago and by then they said it was due to a bug in Weblogic 4.5 and would be fixed in 5.1.
Anyway, I upgraded to 5.1 as soon as was available but eversince I'm still bugged by these login problems now and then.
I've seen it with both servlets (running in from container) and command line apps.
Usually everything goes fine, but sometimes a client refuses to login correctly. I haven't changed anything on the server.
My guess is that I'm not the only one who noticed this, so someone probably already tracked it down and solved it.
Could it be in the jdk on the client?
Erik
-
Weblogic sees only user 'guest' (5 messages)
- Posted by: Erik van Zijst
- Posted on: August 21 2000 07:31 EDT
Threaded Messages (5)
- Weblogic sees only user 'guest' by Suresh Vasudev on August 21 2000 07:43 EDT
- Weblogic sees only user 'guest' by Erik van Zijst on August 21 2000 09:23 EDT
- Weblogic sees only user 'guest' by Chuck McCorvey on August 22 2000 12:12 EDT
- Weblogic sees only user 'guest' by Erik van Zijst on August 23 2000 11:56 EDT
- Weblogic sees only user 'guest' by Chuck McCorvey on August 23 2000 15:44 EDT
-
Weblogic sees only user 'guest'[ Go to top ]
- Posted by: Suresh Vasudev
- Posted on: August 21 2000 07:43 EDT
- in response to Erik van Zijst
Could you please provide the actual Error Stack trace that you are getting?
Then we can see work on what could be the problem?
-
Weblogic sees only user 'guest'[ Go to top ]
- Posted by: Erik van Zijst
- Posted on: August 21 2000 09:23 EDT
- in response to Suresh Vasudev
There is no stack trace and there is no exception.
It's just like InitialContext ignores my security information.
Erik
-
Weblogic sees only user 'guest'[ Go to top ]
- Posted by: Chuck McCorvey
- Posted on: August 22 2000 12:12 EDT
- in response to Erik van Zijst
Do you create an initial context for each thread that attempts to use your EJB's or their homes? Remember that the Context is thread specific even though the socket connection is shared. -
Weblogic sees only user 'guest'[ Go to top ]
- Posted by: Erik van Zijst
- Posted on: August 23 2000 11:56 EDT
- in response to Chuck McCorvey
Chuck,
Most clients aren't even multithreaded.
Even the most simple commandline test app can demonstrate the problem:
---8<-----cut here----------------------------------
import javax.naming.*;
import java.rmi.*;
import java.util.*;
public class Client
{
public static void main(String[] argv)
{
try
{
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, url);
.put(Context.SECURITY_PRINCIPAL, "user");
h.put(Context.SECURITY_CREDENTIALS, "password");
Context ctx = new InitialContext(h);
}
catch(NamingException ne)
{
System.out.println("NamingException: " + ne.getMessage());
}
}
}
---8<-----cut here----------------------------------
Note that I can't find any pattern. Usually it works fine, but sometimes starts to log in as 'guest'.
It must ofcourse be when I change something, but I have no clue.
Erik
-
Weblogic sees only user 'guest'[ Go to top ]
- Posted by: Chuck McCorvey
- Posted on: August 23 2000 15:44 EDT
- in response to Chuck McCorvey
Hmmm... I haven't seen that one!