title: DDL command not created by liquibase when trying to run it from Java code
body: <p>Update:</p>
  
  <p>I think the problem is this line because it returns an empty list when I called <code>changelog.getChangeSets()</code>, so what is wrong this code?</p>
  
  <pre><code>    static liquibase.changelog.DatabaseChangeLog changelog = new DatabaseChangeLog(
              "src/main/resources/changelog.xml");
  </code></pre>
  
  <p>Original post:</p>
  
  <p>My goal is to run database DDL commands with existing changelog in Java class. 
  Currently my set up is like this:</p>
  
  <pre><code>public class LiquibaseWithJavaCode {
      //find the location of the existing changelog.xml file
      static liquibase.changelog.DatabaseChangeLog changelog = new DatabaseChangeLog(
              "src/main/resources/changelog.xml");
  
      static void executeUpdate1() throws SQLException, LiquibaseException {
  
          java.sql.Connection connection = getConnection();
  
          Database database = DatabaseFactory.getInstance()
                  .findCorrectDatabaseImplementation(
                          new JdbcConnection(connection));
  
          Liquibase liquibase = new liquibase.Liquibase(changelog,
                  new ClassLoaderResourceAccessor(), database);
  
          liquibase.update(new Contexts(), new LabelExpression());
      }
  
      public static Connection getConnection() throws SQLException {
  
          Connection conn = null;
          Properties connectionProps = new Properties();
          connectionProps.put("user", "liquibase");
          connectionProps.put("password", "password");
  
          conn = DriverManager
                  .getConnection(
                          "jdbc:sqlserver://111.11.1.1;databaseName=liquibase;SelectMethod=cursor",
                          connectionProps);
          return conn;
      }
  }
  
      public static void main(String[] args) throws SQLException,
          LiquibaseException {
              executeUpdate1();
      }
  </code></pre>
  
  <p>When I run it here is the output:
  <a href="https://i.stack.imgur.com/X7LNn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X7LNn.jpg" alt="enter image description here"></a></p>
  
  <p>I created the <code>changelog.xml</code> and it contains a lot of changeset that handles a lot of DDL command. But it seems the <code>changeLogFile</code> does not contain any changeset, it is empty. I double checked with the database, and it was indeed no actually table created, only two tables <code>DATABASECHANGELOG</code> and <code>DATABASECHANGELOGLOCK</code> being created.</p>
  
  <p>Did I do anything wrong? How do I correct it? To be honest I am not familiar about it so please advice.</p>