Wednesday July 11th - Upgrade the MySQL JDBC drivers

On two separate occasions, I’ve downloaded open source war-based Java applications that install and run perfectly well in a recent Tomcat, only to discover that I am unable to log in with the default administrator credentials.  From a bit of debugging, it appears that the hash function for generating the password hash does not generate something that matches the database column.  I don’t really know why this is, but I do know how to fix it:

In both cases, the applications shipped with MySQL JDBC drivers 3.x.  Removing the shipped version in the WEB-INF/lib folder and replacing it with the 5.x version immediately fixed the problem.  So if you find yourself having trouble logging into a Java-based web application, check the MySQL drivers and replace as necessary.