[SOLVED] org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR:

Here you can find the solution for a problem: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR exception

The prbolem

When you invoke a webservice you got the exception like below:

org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.

The cause

There is a bug in the wss4j-ws-security-dom library in version 2.2.0 which might be delivered as dependency by SpringBoot freamework.

The solution

As as solution you can override the wss4j-ws-security-dom library dependency to hogher version forthe time it will be included in proepr vesiona as SpringBoot dependency. For do this – just open pom.xml file and add the followinf depenency.


Leave a Reply

Notify of
Close Menu