In my application, we are doing dynamic class casting where lot of implementations are there (Please refer pic). The application is working fine when it is running in eclipse but not after the build (mvn clean install).
Loading data from XML,
ClinicalDocument cda = // loads data from XML
While running the application in eclipse, the following casting is working fine.
ContinuityOfCareDocument ccd = (ContinuityOfCareDocument) cda;
But after the build (mvn clean install), ClassCastException occurs.
org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl cannot be cast to org.openhealthtools.mdht.uml.cda.consol.ContinuityOfCareDocument
If anyone know how to resolve it, your help would be immense.