Liquibase is not committing my changes

Ahh, I thought it was a parameter to allow logging. Thanks.

Connection con = null; try { Properties props = new Properties(); props.load(getClass().getResourceAsStream("/datasource.properties")); String driver = props.getProperty(“database.driver”); String url = props.getProperty(“database.url”); String username = props.getProperty(“database.username”); String password = props.getProperty(“database.password”); Class.forName(driver); con = DriverManager.getConnection(url, username, password); Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(con)); Liquibase liquibase = new Liquibase(“db.xml”, new ClassLoaderResourceAccessor(), database); response.getWriter().print("

"); liquibase.update("", response.getWriter());  con.commit(); } catch (Exception e) { log.error(e.getMessage(), e); throw new ServletException(e.getMessage(), e); } finally { if (con != null) { try { con.close(); } catch (SQLException e) { log.warn(e.getMessage(), e); } } } response.flushBuffer();

Strange if I change:


  1. liquibase.update("", response.getWriter());

to

  1. liquibase.update("");


It works. Why?



The updateSQL command.

Best,
Laird


http://about.me/lairdnelson