Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem to get j2ee server context

Status
Not open for further replies.

tushars

Technical User
Dec 18, 2002
2
IN
Hi,
I am integrating my application with weblogic 6.1 server. When I try to access the context of Weblogic server, I am getting the following exception.

javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: attempting to add an object which is not an instance of java.security.Principal to a Subject's Principal Set]

The Client program is running properly if I run the client program from the Weblogic server machine. If I try to run the client program from another machine, then it is giving this problem.

Please help me regarding this problem. Thanks in advance.
Regards
Tushar
 
- open Weblogic Console
- select your server domain name
- select 'Security'
Check 'Guest Disabled' check box.
--------
checked - guest does not have permission to access WL
unchecked - guest has permission
---------
---------
But,also you can access WL from guest user with username/password [ if default guest is disabled ]
ex.
----------------------------
private T3ServicesDef getT3Services(String wlUrl)
throws javax.naming.NamingException
{
T3ServicesDef t3s;
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, wlUrl);
env.put(Context.INITIAL_CONTEXT_FACTORY,weblogic.jndi.WLInitialContextFactory.class.getName());

if( m_username!= null && m_password != null )
{
//Make sure that the value for
//the Context.SECURITY_AUTHENTICATION property is one
// of the valid values
//("none", "simple", or "strong").
//simple Use weak authentication
//(clear-text password)
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, m_username );
env.put(Context.SECURITY_CREDENTIALS, m_password );
}
Context ctx = new InitialContext(env);
t3s = (T3ServicesDef) ctx.lookup("weblogic.common.T3Services");
ctx.close();
return(t3s);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top