We investigated and found the problem:
This is happening when using WildFly 10.1.0 Final, which uses a Proxy Implementation of WOODSTOX and cannot be detected as a valid implementation of StaxImplementation in JaxpContext. The problem lies on these lines:
public static enum StaxImplementation {
WOODSTOX{
@Override
boolean isInstance(XMLInputFactory xmlInputFactory) {
try {
return Class.forName("com.ctc.wstx.stax.WstxInputFactory", true, Thread.currentThread().getContextClassLoader()).isInstance(xmlInputFactory);
}
catch (ClassNotFoundException e) {
return false;
}
}
And the solution we tried is this one:
public static enum StaxImplementation {
WOODSTOX {
@Override
boolean isInstance(XMLInputFactory xmlInputFactory) {
try {
try {
if ((xmlInputFactory.getProperty("org.codehaus.stax2.implVersion") == null)) {
return Class.forName("com.ctc.wstx.stax.WstxInputFactory",true,
Thread.currentThread().getContextClassLoader())
.isInstance(xmlInputFactory);
}
} catch (IllegalArgumentException e) {
return Class.forName("com.ctc.wstx.stax.WstxInputFactory", true,
Thread.currentThread().getContextClassLoader()).isInstance(xmlInputFactory);
}
return true;
} catch (ClassNotFoundException e) {
return false;
}
}
reference: https://github.com/jamesagnew/hapi-fhir/issues/551
We would appreciate if you could solve this issue in the next release.
Thank you