We’re experiencing this error too. I’ve upgraded the webservices version in bahmni-core from 2.17 to 2.24.0 due to the security threat.
Now a bunch of integration tests are failing with a NoClassDefFoundError. An example of such test is ReferenceDataConceptReferenceTermServiceImplIT. This fails with java.lang.NoClassDefFoundError: org/openmrs/CodedOrFreeText.
According to OpenMRS API Docs, CodedOrFreeText was added in OpenMRS 2.2 but bahmni-core depends on 2.1.1.
I tried the solution provided by @preethi.s above with no success.
I added
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>webservices.rest-omod</artifactId>
<version>${openMRSWebServicesVersion}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
In bahmni-core/pom.xml and later bahmni-core/reference-data/pom.xml since all failing tests are coming from the reference-data submodule. But it still didn’t work. Tests still fail with the same error.