Changed to catch ClassNotFoundException and SQLException.