Change calls to ConnectionFactory.newConnection to match the correct signature.