Hadoop 2 depends on xercesImpl 2.9.1, which is more than 10 years old. The latest version is 2.12.0, released last year Let's update this dependency.
HDFS-12221 removed xercesImpl in Hadoop 3. Looking at HDFS-12221, the impact of this dependency is very minimal: only used by offlineimageviewer. TestOfflineEditsViewer passed for me after the update. Not sure about the impact of downstream applications though.