It turns out that upgrading dom4j to 2.2.1 ( HHH-12964 Closed ) requires JDK8 in 5.1.17 anyhow, so it will not be possible to restore compatibility with JDK6 in 5.1, so resolving this as "Won't Fix".