title: org.dbunit.dataset.NoSuchTableException ERROR DatabaseDataSet - Table 'trip' not found
body: <p>I've been bing/google (boogle) searching and I have found a few hits (mostly on stackoverflow) and I have tried to apply the suggested solutions with no luck.</p>
  
  <p>I'm using Java 8 and DBUnit 2.5.1 and mysql-connector-java 5.1.36 and mysql (Ver 14.14 Distrib 5.6.15, for Win64 (x86_64)).</p>
  
  <p>I'm reading an XML file previously created by DBUnit that defines several tables one of which is called "trip". My instance of mysql has an empty database called "dbunit" and my expectation is that my code will read the XML and populate the database "dbunit" with the tables and the table rows with the data in the XML files.</p>
  
  <p>Here is a fragment of my datafile that was created by dbunit from the mysql database "pocketguide3rded" (based on the book SQL Pocket Guide 3rd Edition).</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;dataset&gt;
    &lt;trip name="M-28" stop="1" parent_stop="3"/&gt;
    &lt;trip name="M-28" stop="3"/&gt;
    &lt;trip name="M-28" stop="8" parent_stop="1"/&gt;
    &lt;trip name="M-28" stop="9" parent_stop="8"/&gt;
    &lt;trip name="M-28" stop="10" parent_stop="9"/&gt;
    &lt;trip name="M-28" stop="11" parent_stop="10"/&gt;
    &lt;trip name="Munising" stop="1"/&gt;
    &lt;trip name="Munising" stop="2" parent_stop="1"/&gt;
    &lt;trip name="Munising" stop="3" parent_stop="4"/&gt;
    &lt;trip name="Munising" stop="4" parent_stop="6"/&gt;
    &lt;trip name="Munising" stop="5" parent_stop="3"/&gt;
    &lt;trip name="Munising" stop="6" parent_stop="2"/&gt;
    &lt;trip name="US-2" stop="11" parent_stop="12"/&gt;
    &lt;trip name="US-2" stop="12" parent_stop="14"/&gt;
    &lt;trip name="US-2" stop="13" parent_stop="11"/&gt;
    &lt;trip name="US-2" stop="14"/&gt;
  &lt;/dataset&gt;
  </code></pre>
  
  <p>Here is my code. </p>
  
  <pre><code>    public static void fullDatabaseImport(File file) throws     ClassNotFoundException, 
                                                              DatabaseUnitException, 
                                                              IOException,
                                                              SQLException {
      IDatabaseConnection connection = getConnection();
      IDataSet dataSet = new FlatXmlDataSet(file, true);
  
      DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);
      //DatabaseOperation.INSERT.execute(connection, dataSet);
  }
  
  public static IDatabaseConnection getConnection() throws     ClassNotFoundException, 
                                                              DatabaseUnitException, 
                                                              SQLException {
      // database connection
      Class driverClass = Class.forName(_driverClass);
      Connection jdbcConnection = DriverManager.getConnection(_jdbcConnection, username, password);
      IDatabaseConnection dbConn = new DatabaseConnection(jdbcConnection/*,"dbunit"*/);
      dbConn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());
      dbConn.getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler());
      dbConn.getConfig().setProperty(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, Boolean.TRUE);
  
      return dbConn;  
  }
  </code></pre>
  
  <p>I'm getting this exception on the call to CLEAN_INSERT.execute.</p>
  
  <p>Here is the output from my attempt to run a junit test.</p>
  
  <p>JUnit version 4.11</p>
  
  <p>.ERROR DatabaseDataSet - Table 'trip' not found in tableMap=org.dbunit.dataset.OrderedTableNameMap[_tableNames=[], _tableMap={}, _caseSensitiveTableNames=true]</p>
  
  <p>E</p>
  
  <p>Time: 0.464</p>
  
  <p>There was 1 failure:</p>
  
  <p>1) test5_Test(com.heintze.demos.wikidot_com_demoimportexport.DemoDBUnit)</p>
  
  <p>org.dbunit.dataset.NoSuchTableException: trip
      at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:288)   at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:109)
      at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
      at com.heintze.demos.wikidot_com_demoimportexport.DemoDBUnit.fullDatabaseImport(DemoDBUnit.java:265)
      at com.heintze.demos.wikidot_com_demoimportexport.DemoDBUnit.test5_Test(DemoDBUnit.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runners.Suite.runChild(Suite.java:127)
      at org.junit.runners.Suite.runChild(Suite.java:26)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
      at org.junit.runner.JUnitCore.runMain(JUnitCore.java:96)
      at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:47)
      at org.junit.runner.JUnitCore.main(JUnitCore.java:40)</p>
  
  <p>FAILURES!!!
  Tests run: 1,  Failures: 1</p>
  
  <p>/cygdrive/c/Users/siegfried/Documents/spring-tool-suite-workspaces/DBUnitDemo/wikidot-com-demoimportexport/src/test/java/com/heintze/demos/wikidot_com_demoimportexport</p>