Hello!
I am upgrading the radiology module to openmrs core 1.11.4.
Adding a dependency to hapi-structures-v231 which provides hl7 messages of version 2.3.1 leads following exception when I deploy the module:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/tmp/tomcat7-tomcat7-tmp/1446200793163.openmrs-lib-cache/radiology/lib/radiology-api-0.1.0.0-dev-SNAPSHOT.jar!/moduleApplicationContext.xml]; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
(see full log at http://pastebin.com/TP36zhaU)
The module compiles and tests run fine. However when I deploy it I get above exception.
Following post http://stackoverflow.com/questions/20404951/org-apache-xerces-jaxp-documentbuilderfactoryimpl-incompatible-with-javax-xml-pa tells me that I need to make sure that I don’t have multiple versions of Xerces
If I remove all my hl7 related classes and the dependency to hapi-structures-v231 I can deploy the module. So this must be it.
Does anybody have an idea/steps I can take to resolve this?
Deploying on:
OS: Ubuntu 14.04 64bit Java: Open JDK 1.7.0_85 Tomcat: 7 (package 7.0.52-1ubuntu0.3) Mysql: 5.5.46
Dependency I added to the root pom.xml
<dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-structures-v231</artifactId> <version>2.0</version> </dependency>
mvn dependency:tree on the radiology module root gives: http://pastebin.com/u9u3Lz9X