public static void main(String[] args) throws Exception {
//execute("jdbc:postgresql://localhost:5432/JAVA_Test", "Admin", "123456", "org.postgresql.Driver");
execute("jdbc:jtds:sqlserver://localhost:5432/Liquibase_JAVA", "sa", "123456!", "net.sourceforge.jtds.jdbc.Driver");
}
public static void execute(String url, String userName, String password, String driver) throws Exception {
DatabaseConnection dbConnection = new DatabaseConnection(url, driver, userName, password);
Connection conn = dbConnection.getConnection();
Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(conn));
String changeLog = "/job_executor/liquibasechangelog/databaseChangeLog.xml";
Liquibase liquibase = new Liquibase(changeLog, new FileSystemResourceAccessor(), database);
liquibase.update(null);
conn.close();
}
I have my changeLogFile inside my project. It's kind of weird that i'm getting an error changeLogFile.xml does not exists.
Can anyone help me with this, THanks
changeLogFile.xmlbut in your description, but in your code you're usingdatabaseChangeLog.xml. Are you sure the file with the name in the code exists?