Menu

Struts-resume problem with CMA[OT]

2003-09-30
2003-09-30
  • Richard Mixon

    Richard Mixon - 2003-09-30

    I used Struts-Resume (from January 2003) for the basis for our webapp. We are having a dickens of a time solving an authentication proble that sporadically crops up. I think it is more Tomcat/MySQL related and have posted to the Tomcat forum. Still in case, I'm posting here.

    Problem summary:
    - Passwords for userids that have been working appear to stop working.
    - Newly setup userids and passwords do not work at first, usually for 30 minutes.
    It feels like the password values are "changing" (sure, I know - its the gremlins) and/or that the MySQL connection that Tomcat uses for authentication is seeing an "old" copy of the database.

    We use Hibernate for database access. I have the users/userid table cached as read-write. This is on Tomcat 4.1.24 on SPARC Solaris 8.

    I am currently trying to get access to the MySQL log
    (we are on a shared server). And we have posted this issue on the tomcat-user mailing list - no real help so far.

    Also we have verified that the value for password in MySQL matches the value that my login servlet passes (as value j_password) to j_security_check. Here are relevant lines from my catalina log and from a MySQL query:

    LOG: 09:32:23,543 DEBUG LoginServlet:263 - Issuing response.sendRedirect(/stars/j_security_check?j_username=ishafer&j_password=d8a803e6ed829e9d7949528cd961de0f854d4fec)

    MYSQL:
    mysql> select userid,password from PoAssociate where userid='user1234';          +------------------------------------------+---------+
    | userid  | password                                 |
    +---------+------------------------------------------+
    | user1234 | d8a803e6ed829e9d7949528cd961de0f854d4fec |
    +---------+------------------------------------------+
    1 row in set (0.01 sec)

    mysql> select userid,roleName from PoUserRole where userid='user1234';
    +---------+------------+
    | userid  | roleName   |
    +---------+------------+
    | user1234 | instructor |
    +---------+------------+
    1 row in set (0.01 sec)

    Any ideas, suggestions or solutions are much appreciated. Our operations person is about to tear their hair out. We keep saying "Are you sure you did not mistype the password again?".  That was certainly the case once or twice, but not this many times.

    Thank you - Richard Mixon

     
    • Matt Raible

      Matt Raible - 2003-09-30

      First thing I would try is removing the cache settings from the user object - that sounds like what the problem is.  If that works - contact the Hibernate list and figure out a better way to setup caching for the user object.

      HTH,

      Matt

       
    • Richard Mixon

      Richard Mixon - 2003-09-30

      Matt, Thanks for the prompt answer.

      It did start "about" the time we turned caching on. I will look into turning off the cache for users in production, even though it is read-write. The problem does not occur in our development/test environment (Windows), only in the Solaris SPARC environment. And even in production it appears to be intermittent.

      I', going to go on and post the question to the Hibernate forum anyway.

      Thanks again - Richard

       

Log in to post a comment.