Problem running tests against OpenMRS Core 2.3.0-

We recently upgrading one of our modules to build and test against OpenMRS 2.3.0 and the tests are failing when trying to set up the application context. In 2.3.0 the hibernate mappings for Allergy were moved from a hibernate mapping file to annotations directly on the class, and it looks like that is what is causing the problem:

Caused by: org.hibernate.MappingException: An association from the table allergy_reaction refers to an unmapped class: org.openmrs.Allergy

Any thoughts? Do we need to change our TestApplicationContext to properly pick up annotation-based mappings?

@wyclif @dkayiwa @mksd

Thanks! Mark

1 Like

Thanks for reporting it @mogoodrich, I believe @wyclif is looking into it as per the chat exchange on TRUNK-5661.

1 Like

Thanks @mksd

@wyclif provided a suggestion on the ticket and it worked… for reference we just need to set up scanning in the TestApplicationContext as follows: