I can connect over T3 to a server B from a regular java-application. When I
do the same from an EJB on server A I get an authentication-error:
Code used to create the InitialContext is:
-----------------------------------------
// Create the context
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
weblogic.jndi.WLInitialContextFactory.class.getName());
p.put(Context.PROVIDER_URL, "MY_URL");
p.put(Context.SECURITY_PRINCIPAL, "MY_USERNAME");
p.put(Context.SECURITY_CREDENTIALS, "MY_PASSWORD");
InitialContext ctx = new InitialContext(p); // throws an
AuthenticationException here when in EJB on server A
// Get remote object
MyHome home = (MyHome)ctx.lookup("MY_JNDI_NAME");
MyRemote remote = home.create();
// Call methods on remote object
remote.myMethod();
-----------------------------------------
Both server A and B are WL6.1 SP2 and they have the same system-password.
Any ideas why the code works nice from a normal javaprogram, but not from a
EJB running on Server A?
The calling EJB gets the following Exception:
javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: Authentication for user myuser denied in realm
weblogic
Start server side stack trace:
java.lang.SecurityException: Authentication for user myuser denied in realm
weblogic
at weblogic.security.acl.Realm.authenticate(Realm.java:212)
at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
at weblogic.security.acl.internal.Security.authenticate(Security.java:125)
at weblogic.kernel.BootServicesImpl.authenticate(BootServicesImpl.java:119)
at weblogic.kernel.BootServicesImpl.authenticate(BootServicesImpl.java:210)
at weblogic.kernel.BootServicesImpl.invoke(BootServicesImpl.java:145)
at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:638)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
at
weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.jav
a:164)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:643)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
End server side stack trace
Mala
--
maybe a different realm configuration of servers A and B causes the problem.
regards,
przemek
Tor Mala schrieb: