When a unit test using this class is initializing I receive an error:
org.dbunit.dataset.NoSuchTableException: CAPD.PARTY_PHONE_CONTACT
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.github.springtestdbunit.DbUnitRunner.setupOrTeardown(DbUnitRunner.java:146)
at com.github.springtestdbunit.DbUnitRunner.afterTestMethod(DbUnitRunner.java:70)
at com.github.springtestdbunit.DbUnitTestExecutionListener.afterTestMethod(DbUnitTestExecutionListener.java:158)
The error message is misleading. I eventually tracked it down to the column name. Changing the annotation name to something other than "PRIMARY" worked fine so I assume it is a keyword.
In a java class with hibernate annotations I have one annotation like so:
@Column(name = "PRIMARY") private Boolean isPrimary;
When a unit test using this class is initializing I receive an error:
org.dbunit.dataset.NoSuchTableException: CAPD.PARTY_PHONE_CONTACT 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.github.springtestdbunit.DbUnitRunner.setupOrTeardown(DbUnitRunner.java:146) at com.github.springtestdbunit.DbUnitRunner.afterTestMethod(DbUnitRunner.java:70) at com.github.springtestdbunit.DbUnitTestExecutionListener.afterTestMethod(DbUnitTestExecutionListener.java:158)
The error message is misleading. I eventually tracked it down to the column name. Changing the annotation name to something other than "PRIMARY" worked fine so I assume it is a keyword.