Question

I use Hibernate in create-drop mode to create tables at startup. (tables are created in the public schema in hsqlDB).

For some reason, DBunit is not able to add data into my table:

ERROR org.dbunit.database.DatabaseDataSet - 
Table 'MY_TABLE' not found in tableMap=org.dbunit.dataset.OrderedTableNameMap[_tableNames=[], _tableMap={}, _caseSensitiveTableNames=false]

...

Caused by: org.dbunit.dataset.NoSuchTableException: MY_TABLE

I am using unitils annotation @DataSet.

I suspect that DBunit is not using the correct schema, but cannot find a solution to this issue.

Note : hibernate works OK, I see successful requests at startup.

Has anyone faced the same problem ? Am I missing something ?

Thanks,

Was it helpful?

Solution

solution is in unitils.properties :

database.schemaNames=PUBLIC

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top