A simple solution for debugging JDBC problems, the LogDriver logs all SQL queries to a log4j Stream. More information can be found in the ReadMe of the package.
Articles: Java Developer's Journal