I have found the version of the MySQL connector to be the problem. Versions earlier than 2.0.9 gave me the same problem you're experiencing. The latest version is 2.0.14, I think.
John > > From: "Paul Phillips" <[EMAIL PROTECTED]> > Date: 2002/10/02 Wed PM 07:25:40 EDT > To: <[EMAIL PROTECTED]> > Subject: jdbc realm fails to authenticate sometimes > > Hello all > > I am running Tomcat 4.1.10 and using a jdbc realm with mysql. It is setup > accordingto the docs on the jakarta web site. (At least I think it is!) > > The entry in my server.xml file looks like this: > > > <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" > driverName="org.gjt.mm.mysql.Driver" > connectionURL="jdbc:mysql://localhost/authority" > connectionName="me" connectionPassword="mypassword" > userTable="users" userNameCol="user_name" userCredCol="user_pass" > userRoleTable="user_roles" roleNameCol="role_name"/> > > I am finding occasional authentication failures that always follow the > same pattern.I say occasional in that often the authentication works perfectly well. > > When it doesn't this is what happens... > 1) user tries to authenticate (typing very carefully the username and > password),tomcat throws error, sending user to error.jsp page. > 2) Sometimes, on second attempt, authentication works, and user is allowed > accessto webapp. > 3) However, sometimes on second attempt, Tomcat throws a null pointer > exception.If the user simply presses retry (on the browser) at that point, he/she is > allowedaccess to the application! So, in this case, somehow the authentication > is takingplace on the second attempt, but an exception is being thrown somewhere... > > I was wondering if this had something to do with the 8 hour disconnect of > mysql, andI added: > autoreconnect=true > to the URL above, but that didn't seem to fix the problem. > > This is driving users of my webapp nuts (as you can imagine). Does anyone > haveany ideas of where to look, or what I can do to avoid this? > > Thanks > Paul Phillips > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
