private void chainProcessEvent(XMLSecEvent xmlSecEvent) throws XMLStreamException {
try {
outputProcessorChain.reset();
outputProcessorChain.processEvent(xmlSecEvent);
} catch (XMLSecurityException e) {
throw new XMLStreamException(e);
} catch (XMLStreamException e) {
String msg = e.getMessage();
if (msg != null && msg.contains("Trying to declare prefix xmlns (illegal as per NS 1.1 #4)")) {
throw new XMLStreamException("If you hit this exception this most probably means" +
"you are using the javax.xml.transform.stax.StAXResult. Don't use " +
"it. It is buggy as hell.", e);
}
//NB1: net.java.dev.stax-utils also doesn work: [Fatal Error]
// :4:425: Attribute "xmlns" was already specified for element ...