On Mar 9, 2008, at 4:05 AM, Ron Pitts wrote:

> Getting some werid problem using resin 3.1.5, I was using 3.1.4  
> without any problems but looks like my form login is now broken.

Hmm.  You need to add a jndi-name to the <authenticator jndi- 
name="caucho/auth">, or even better, rewrite the FormLogin to look like:

CFormLogin extends ... {
   @javax.webbeans.In ServletAuthenticator _auth;

   ...
}

When I updated the authenticator to use WebBeans, I'd thought the  
"caucho/auth" name was only used internally to Resin, so removed the  
default.

-- Scott

>
> Its returning an error javax.naming.NameNotFoundException: java:comp/ 
> env/caucho/auth
>
> Abtract of the class is as follows :
>
>
> public class CFormLogin extends com.caucho.server.security.FormLogin
>
>   public ServletAuthenticator getAuthenticator()
>   {
>     log.debug("get servletauthenticator");
>
>     if (_auth == null) {
>       log.debug("auth =  null");
>       try {
>         javax.naming.Context ic = new javax.naming.InitialContext();
>         _auth = (ServletAuthenticator) ic.lookup("java:comp/env/ 
> caucho/auth");
>       log.debug(_auth.toString());
>       } catch (Exception e) {
>         log.debug(e.toString());
>       }
>
> Abtract of Web.xml
>
>   <authenticator type='jw.jaas.CServletAuthenticator'>
>     <init>
>  <data-source>jdbc/mysql</data-source>
>     </init>
>   </authenticator>
>
>   <!-- Default login configuration uses form-based authentication -->
>   <login-config type="jw.jaas.CFormLogin">
>       <auth-method>formc</auth-method>
>       <realm-name>Anonymous Form-Based Authentication Area</realm- 
> name>
>     <init>
>         <form-login-page>/index.jsp</form-login-page>
>         <form-error-page>/error.jsp</form-error-page>
>         <internal-forward>/protected/menu.jsp</internal-forward>
>       </init>
>
>       <form-login-config>
>         <form-login-page>/protected/login.jsp</form-login-page>
>         <form-error-page>/error.jsp</form-error-page>
>   <internal-forward>/protected/menu.jsp</internal-forward>
>       </form-login-config>
>   </login-config>
>
>
> Any ideas....
>
> thanks
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to