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 Thu, 03 Nov 2005 06:53:44 GMT
Hi list:

   I've resolved this problem with my Portal Application in JetSpeed 2.0.
   Well , I think I have made a big mistake on the application that
duplicate the jackrabbit snapshot jar file in both application's lib
folder and tomcat common lib folder , so , it caused the
CredentialsCallback object in application to not in the same
classloader for the 2 files , and it is running correctly when I
removed jar file in the application's lib folder.

Thanks !

Harrison.Yao
2005-11-03


2005/11/3, Yao Harrison <harrison.gyao@gmail.com>:
> 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