Closed ethicalhavoc closed 4 years ago
I'm afraid I don't know, I don't recognise the error.
There are issues related to the JDK's upgrade of Santuario https://bugs.openjdk.java.net/browse/JDK-8217878. The comments on the issue mention JDK-8218629 XML Digital Signature throws NAMESPACE_ERR exception on OpenJDK 11, works 8/9/10 which seems like it may be what you are experiencing.
Both Santuario and JDK seem to have downgraded the XML marshalling used by Santuario. The last comment requests the fix also to be applied to Java 11, but I am not sure if it has been done.
Which Java 11 version are you using? The last version of the OpenJDK seems to be 11.0.6. If the problem is still present in the latest OpenJDK 11, maybe try Java 14.
If this does not help, maybe you should ask either the developers of Apache Santuario, or the JDK itself.
Dear Team
I was getting the "org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR" after upgrading to Java 11 while signing a Document.
After going through the solution you have given, I changed the implementation by giving a New Document instead of the Original Document.
But, Now I am getting the "org.w3c.dom.DOMException: NAMESPACE_ERR" at "signature.sign(dsc)" Line in the below code: