https://issues.apache.org/bugzilla/show_bug.cgi?id=49965

           Summary: JAASRealm uses wrong string constants
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: j...@virkki.com


org.apache.catalina.realm.JAASRealm imports:

import org.apache.catalina.authenticator.Constants;

This means that the StringManager it creates:

    protected static final StringManager sm =
        StringManager.getManager(Constants.Package);

ends up getting the message strings from
org.apache.catalina.authenticator.LocalStrings.properties instead of the one
from its own package.

As a result whenever the JAASRealm code attempts to look up message strings,
they won't be found. For example, when authentication fails, line 430:

            log.warn(sm.getString("jaasRealm.loginException", username), e);

Since org.apache.catalina.authenticator.LocalStrings.properties does not have a
"jaasRealm.loginException" entry, what shows up in the logs is

WARNING: Cannot find message associated with key jaasRealm.loginException

This is based on running and looking at 6.0.29 code, but I remember seeing the
same behavior in 6.0.20 as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to