Org.dbunit.dataset.nosuchtableexception, But Table Exists
H2 1.4.191. DbUnit 2.5.1. How this can be fixed? Code and results for 3 cases: org.dbunit.dataset.NoSuchTableException: category org.dbunit.dataset.NoSuchTableException: Category
Solution 1:
Sometimes when you are using dbunit you need to define the schema from which you are trying to use the table, probably you could try to add
<dataset><schema.CategorycategoryId="9223372036854775806"categoryName="NAME"categoryParentId="9223372036854775805"/></dataset>If not check the datasource that you are using, probably you are not pointing to the correct database or schema.
For dbunit we have some properties consider using the Qualified table names property as follows.
DatabaseConfigdBConfig= dBConn.getConfig(); // dBConn is a IDatabaseConnection
dBConfig.setProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, true);
Post a Comment for "Org.dbunit.dataset.nosuchtableexception, But Table Exists"