I'm not exactly sure what's going on in this trace with the modules version of XmlInputFactory, but it looks like the static XMLInputFactory in XmlParserHelper can leak the deployment classloader.