title: HSQL and DBUnit - The given schema 'SA' does not exist
body: <p>I try to write some unit tests with DBUnit. I want to use the in-memory database HSQL.
  First in my Hibernate properties I use </p>
  
  <pre><code>&lt;prop key="hibernate.hbm2ddl.auto"&gt;create&lt;/prop&gt;
  </code></pre>
  
  <p>to create the tables from my entities.</p>
  
  <p>Then I configure my datasource like this (file test-hibernate-config.xml):</p>
  
  <pre><code>    &lt;bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName"&gt;
          &lt;value&gt;org.hsqldb.jdbcDriver&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="url"&gt;
          &lt;value&gt;jdbc:hsqldb:mem:test;sql.syntax_ora=true&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="username"&gt;
          &lt;value&gt;SA&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="password"&gt;
          &lt;value&gt;&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And then my test class look like this:</p>
  
  <pre><code>@Override
  protected String[] getConfigLocations() {
    return new String[] {"batch-spring-daos.xml", 
                        "test-hibernate-config.xml", 
                        "batch-spring-transactionManager.xml"};
  }
  
  public void setLivraisonDAO(ILivraisonDAO livraisonDAO) {
    this.livraisonDAO = livraisonDAO;
  }
  
  @Test(expected=IllegalArgumentException.class)
  @InsertDBUnitData(dataLocations={ "data/data_release" } )
  public void shouldThrowIllegalArgumentExceptionWhenReleaseDoesntExists(){
    livraisonDAO.getAllLivraisons("1");
  }
  
  @Test
  @InsertDBUnitData(dataLocations={ "data/data_release", "data/data_livraison"} )
  public void shouldRetrieveOneRelease(){
    List&lt;LivraisonEntity&gt; allLivraisons = livraisonDAO.getAllLivraisons("2.5.0.0");
    assertTrue(!allLivraisons.isEmpty());
  }
  </code></pre>
  
  <p>The file batch-spring-dao.xml and batch-spring-transactionManager.xml are those that I use in my application.</p>
  
  <p>But when I try to run my test, I got those logs:</p>
  
  <pre><code>[2014-11-03 10:06:41,349] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:348 : Unsuccessful: alter table IMPACTPARAMDEFECT add constraint FK7327F18F2A1C61A foreign key (IDPARAMETRAGE) references PARAMETRAGE
  [2014-11-03 10:06:41,349] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:349 : a FOREIGN KEY constraint already exists on the set of columns: FK7327F18F2A1C61A in statement [alter table IMPACTPARAMDEFECT add constraint FK7327F18F2A1C61A foreign key (IDPARAMETRAGE) references PARAMETRAGE]
  [2014-11-03 10:06:41,349] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:348 : Unsuccessful: alter table IMPACTPARAMDEFECT add constraint FK7327F1848CCEB7F foreign key (IDPARAMETRAGE) references PARAMETRAGE
  [2014-11-03 10:06:41,364] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:349 : a FOREIGN KEY constraint already exists on the set of columns: FK7327F1848CCEB7F in statement [alter table IMPACTPARAMDEFECT add constraint FK7327F1848CCEB7F foreign key (IDPARAMETRAGE) references PARAMETRAGE]
  [2014-11-03 10:06:41,364] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:348 : Unsuccessful: alter table IMPACTPARAMDEFECT add constraint FK7327F18DAE59D90 foreign key (IDPARAMETRAGE) references PARAMETRAGE
  [2014-11-03 10:06:41,364] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:349 : a FOREIGN KEY constraint already exists on the set of columns: FK7327F18DAE59D90 in statement [alter table IMPACTPARAMDEFECT add constraint FK7327F18DAE59D90 foreign key (IDPARAMETRAGE) references PARAMETRAGE]
  [2014-11-03 10:06:41,364] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:348 : Unsuccessful: alter table IMPACTPARAMDEFECT add constraint FK7327F188951F74F foreign key (IDPARAMETRAGE) references PARAMETRAGE
  [2014-11-03 10:06:41,364] ERROR [main] org.hibernate.tool.hbm2ddl.SchemaExport.create:349 : a FOREIGN KEY constraint already exists on the set of columns: FK7327F188951F74F in statement [alter table IMPACTPARAMDEFECT add constraint FK7327F188951F74F foreign key (IDPARAMETRAGE) references PARAMETRAGE]
  3 nov. 2014 10:06:41 org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet
  INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@67966796] of Hibernate SessionFactory for HibernateTransactionManager
  [2014-11-03 10:06:41,442] INFO  [main] ch.gma.commons.test.AbstractGmaTest.insertData:183 : insertData - *** Inserting test data : file path = data/data_release, schema = ***
  [2014-11-03 10:06:41,458] WARN  [main] org.dbunit.database.DatabaseConnection.validateSchema:195 : The given schema 'SA' does not exist.
  [2014-11-03 10:06:41,489] ERROR [main] org.dbunit.database.DatabaseDataSet.getTableMetaData:286 : Table 'RELEASE' not found in tableMap=org.dbunit.dataset.OrderedTableNameMap[_tableNames=[], _tableMap={}, _caseSensitiveTableNames=false]
  
  [2014-11-03 10:06:41,489] INFO  [main] ch.gma.commons.test.AbstractGmaTest.insertData:189 : insertData - *** Finished inserting test data ***
  [2014-11-03 10:06:41,489] INFO  [main] ch.gma.commons.test.AbstractGmaTest.insertData:183 : insertData - *** Inserting test data : file path = data/data_release, schema = ***
  [2014-11-03 10:06:41,489] WARN  [main] org.dbunit.database.DatabaseConnection.validateSchema:195 : The given schema 'SA' does not exist.
  [2014-11-03 10:06:41,505] ERROR [main] org.dbunit.database.DatabaseDataSet.getTableMetaData:286 : Table 'RELEASE' not found in tableMap=org.dbunit.dataset.OrderedTableNameMap[_tableNames=[], _tableMap={}, _caseSensitiveTableNames=false]
  [2014-11-03 10:06:41,505] INFO  [main] ch.gma.commons.test.AbstractGmaTest.insertData:189 : insertData - *** Finished inserting test data ***
  </code></pre>
  
  <p>Thanks for your help!</p>