jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yao Harrison <harrison.g...@gmail.com>
Subject Re: Can not login with deployment model 2 ( Shared J2EE Resource )
Date Wed, 02 Nov 2005 16:20:58 GMT
Hi Tomasz :

   Thanks for your feedback !

   Well , your advice is the right way to resolve the jaas login
module config file not been set , but it was correct with my jvm
settings , because it hasn't thrown the Exception with infomation not
cofig the login module for my webapplication.

   So , I stepped  into the  breakpoint that throws the login
exception and found that the SimpleCredentials object which
initialized with user name/password  and passed to login method of
reporsitory is null in LoginContext.login( ).

   Followed the code snippet of the point that exception thrown in
LoginContext class:

/**
     * Invokes the login, commit, and logout methods
     * from a LoginModule inside a doPrivileged block.
     *
     * This version is called if the caller did not instantiate
     * the LoginContext with a Configuration object.
     */
    private void invokePriv(final String methodName) throws LoginException {
	try {
	    java.security.AccessController.doPrivileged
		(new java.security.PrivilegedExceptionAction() {
		public Object run() throws LoginException {
		    invoke(methodName);// throws LoginException with
CredentialsCallback  not avaliable here

		    return null;
		}
	    });
	} catch (java.security.PrivilegedActionException pae) {
	    throw (LoginException)pae.getException();
	}
    }




>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2005/11/2, Tomasz Dabrowski <Tomasz.Dabrowski@cognifide.com>:
> > So does anyone else encountered this matter before and
> > how to resovle it.
>
> Have you set the CATALINA_OPTS environment variable?? Let assume that
> you store jaas.config at path %CATALINA_HOME%/conf/jaas.config, so then
> you can do it:
>
> CATALINA_OPTS=-Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaa
> s.config (WINDOWS)
>
> or
>
> CATALINA_OPTS=-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas
> .config (LINUX)
>
> --
> Tomasz Dabrowski
> email: tomasz.dabrowski@cognifide.com
> www: www.cognifide.com
>

Mime
View raw message