System.err.println("Command " + command + " failed with " + e);
System.err.println("Command " + command + " failed with " + e.getMessage());
    public int evaluateBatch(String sql) throws SQLException {        Connection connection = borrowConnection();        Statement statement = null;        int errors = 0;        int commandCount = 0;        try {            statement = connection.createStatement();                        StringTokenizer tokenizer = new StringTokenizer( sql, ";" );            while (tokenizer.hasMoreTokens()) {                String command = tokenizer.nextToken();                                // ignore whitespace                command = command.trim();                if ( command.length() == 0 ) {                    continue;                }                                commandCount++;                                if (log.isDebugEnabled() ) {                    log.debug( "About to execute sql: " + command );                }                                if (continueOnError) {                                                    try {                        int results = statement.executeUpdate(command);                        if (log.isDebugEnabled()) {                            log.debug( "returned: " + results + " row(s) changed" );                        }                    }                    catch (SQLException e) {                        log.error("Command " + command + " failed", e);                        System.err.println("Command " + command + " failed with " + e);                        errors++;                    }                }                else {                    int results = statement.executeUpdate(command);                    if (log.isDebugEnabled()) {                        log.debug( "returned: " + results + " row(s) changed" );                    }                }                                // lets display any warnings                SQLWarning warning = connection.getWarnings();                while (warning != null ) {                    log.warn( warning.toString() );                    warning = warning.getNextWarning();                }                connection.clearWarnings();            }            log.info( "Executed: "+ commandCount + " statement(s) with " + errors + " error(s)" );        }        finally {            closeStatement(statement);            returnConnection(connection);        }        return errors;    }