TRUNK-5065: Incorrect table name while executing a dataset

While writing tests for this issue, i got the following error :

Running org.openmrs.api.AdministrationServiceTest
Tests run: 60, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 14.664 sec <<< FAILURE! - in org.openmrs.api.AdministrationServiceTest
setImplementationId_shouldOverwriteImplementationIdInDatabaseIfExists(org.openmrs.api.AdministrationServiceTest)  Time elapsed: 0.016 sec  <<< ERROR!
org.dbunit.DatabaseUnitRuntimeException: org.dbunit.dataset.NoSuchTableException: concept_source
        at org.dbunit.database.DatabaseDataSet.getTableMetaData(
        at org.dbunit.operation.AbstractOperation.getOperationMetaData(
        at org.dbunit.operation.RefreshOperation.execute(
        at org.openmrs.test.BaseContextSensitiveTest.executeDataSet(
        at org.openmrs.test.BaseContextSensitiveTest.executeDataSet(
        at org.openmrs.api.AdministrationServiceTest.setImplementationId_shouldOverwriteImplementationIdInDatabaseIfExists(

I checked for the table name here and found the table name as concept_reference_source which i think is incorrectly written here as concept_source.

I tried changing it but the changes are getting automatically reverted when building the code.

Please anyone have a look at it and tell me how to change this.


Prabodh :slight_smile:

Interesting, the only place where this faulty test dataset is referred to is in this test method (that is @Ignore-annotated). Perhaps could it be part of your ticket to clean that one up too?

I don’t understand why your changes would be reverted when building the code, are you sure that you are indeed editing the file at the below path?


Look carefully because there would be 3 version of it after a build is done:

$ find . -iname "AdministrationServiceTest-general.xml"

And the versions in api/bin or api/target would be overwritten by a build.

1 Like

Thanks @mksd! :slight_smile:

yes this was happening! I changed the version in api/src and it worked :slight_smile:

yes this was the only place this dataset was referred. I wrote a new test method with the given change in dataset though.

Thank you for your help @mksd


Prabodh :slight_smile: