【发布时间】:2016-06-17 02:21:06
【问题描述】:
H2 1.4.191.
数据库单元 2.5.1。
如何解决这个问题?
3例代码及结果:
org.dbunit.dataset.NoSuchTableException: category
org.dbunit.dataset.NoSuchTableException: Category
org.dbunit.dataset.NoSuchTableException: CATEGORY
//
<dataset>
<Category categoryId="9223372036854775806"
categoryName="NAME"
categoryParentId="9223372036854775805"/>
</dataset>
//
CREATE TABLE Category (
categoryId INT AUTO_INCREMENT,
categoryName VARCHAR NOT NULL,
categoryParentId INT NOT NULL,
PRIMARY KEY (categoryId)
)
//Check - tried to recreate
org.h2.jdbc.JdbcSQLException: Table "CATEGORY" already exists;
【问题讨论】:
-
您是否使用 DTD 加载 XML 文件?如果可以,您也可以发布吗?