Basically, there is no need to package libraries that implement standardized APIs (like javax.xml
) as most of them are already provided either by JRE or application server. This allows for avoiding various incompatibility issues like the one that you face.
If you still need to use a specific version of Xerces, change classloading policy of the web module to PARENT_LAST
. In this case the library will be picked up from WEB-INF/lib
. This does not guarantee you won't have problems though.
To sum it up: remove xercesImpl-2.8.1.jar
from the application. Your operating environment provides XML parser implementation. In most cases you don't need to know which one.