I too was having this problem.
When I put the “echo (mysql_error());” line in wp-db.php as suggested in http://www.railshostinginfo.com/blog/2007/03/19/wordpress-installation-error-establishing-a-database-connection/, I got an error message to the effect that the Connector/J library could not be found.
When I added mysql-connector-java-5.1.7-bin.jar to WEB-INF/lib, the problem went away and wordpress is now working fine.
Hope this helps.
Jim Renkel