title: Error setting database config property for IDatabaseConnection (HSQLDB)
body: <p>I've included fully testable code below, which generates the following error when supplied with a dataset <code>xml</code> containing empty fields. A sample <code>dataset.xml</code> is also below.</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: table.column=places.CITY value is
    empty but must contain a value (to disable this feature check, set
    DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS to true)</p>
  </blockquote>
  
  <p>The thread <a href="https://stackoverflow.com/q/40629855/3851150">here</a> is similar but is different since it uses multiple <code>dbTester.getConnection()</code> whereas my code only uses one, yet has the same error. The main problem relates to this line <code>databaseConfig.setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, Boolean.TRUE);</code> .<br>
   It seems to be ignored entirely. I've tried putting the <code>init</code> code inside the <code>@Test</code> method but the error remains.</p>
  
  <p><strong>dataset.xml</strong></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;dataset&gt;
    &lt;places address="123 Up Street" city="Chicago" id="001"/&gt;
    &lt;places address="456 Down Street" city="" id="002"/&gt;
    &lt;places address="789 Right Street" city="Boston" id="003"/&gt;
  &lt;/dataset&gt;
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>import org.dbunit.IDatabaseTester;
  import org.dbunit.JdbcDatabaseTester;
  import org.dbunit.database.DatabaseConfig;
  import org.dbunit.database.IDatabaseConnection;
  import org.dbunit.dataset.IDataSet;
  import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
  import org.dbunit.operation.DatabaseOperation;
  import org.junit.Before;
  import org.junit.Test;
  import java.io.File;
  import java.sql.Connection;
  import java.sql.PreparedStatement;
  import java.sql.ResultSet;
  
  public class DBConnectionIT {
      IDatabaseTester databaseTester = null;
      IDatabaseConnection iConn = null;
      Connection connection = null;
  
      @Before
      public void init() throws Exception {
          databaseTester = new JdbcDatabaseTester(org.hsqldb.jdbcDriver.class.getName(), "jdbc:hsqldb:mem:testdb;sql.syntax_pgs=true", "sa", "");
          iConn = databaseTester.getConnection();
          DatabaseConfig databaseConfig = iConn.getConfig();
          databaseConfig.setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, Boolean.TRUE);
          connection = iConn.getConnection();
          createTable(connection);
          IDataSet dataSet = new FlatXmlDataSetBuilder().build(new File("dataset.xml"));
          databaseTester.setDataSet(dataSet);
          databaseTester.setSetUpOperation(DatabaseOperation.CLEAN_INSERT);
          databaseTester.setTearDownOperation(DatabaseOperation.DELETE_ALL);
          databaseTester.onSetup();
      }
  
      @Test
      public void testDBUnit() {
          try {
              PreparedStatement pst = connection.prepareStatement("select * from places");
              ResultSet rs = pst.executeQuery();
              while (rs.next()) {
                  System.out.println(rs.getString(1));
              }
          } catch (Exception ex) {
              ex.printStackTrace();
          }
      }
  
      private void createTable(Connection conn) throws Exception {
          PreparedStatement pp = conn.prepareStatement(
                  "CREATE TABLE PLACES" +
                          "(address VARCHAR(255), " +
                          "city TEXT, " +
                          "id VARCHAR(255) NOT NULL primary key)");
          pp.executeUpdate();
          pp.close();
      }
  }
  </code></pre>
  
  <hr>
  
  <h2>EDIT (based on César Rodríguez's answer):</h2>
  
  <p>I've now refactored out this method in the parent class:</p>
  
  <pre><code> protected void setUpDatabaseConfig(DatabaseConfig databaseConfig) {
          databaseConfig.setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, Boolean.TRUE);
      }
  </code></pre>
  
  <p>and created a sub-class which <code>@Overrides</code> this method, but it's saying this sub-class is not being used. How do I address this class (DBConnectionOverride) in the parent class, to solve my problem?</p>
  
  <pre><code>class DBConnectionOverride extends DBConnectionIT {
      @Override
      protected void setUpDatabaseConfig(DatabaseConfig databaseConfig) {
          databaseConfig.setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, true);
      }
  }
  </code></pre>