I run into this error on one box but not another, when using code to "pretty print" XML:
ERROR!
java.lang.NoSuchMethodError: com.sun.org.apache.xml.internal.serialize.OutputFormat.<init>(Lorg/w3c/dom/Document;)V
What could be the problem?
I run into this error on one box but not another, when using code to "pretty print" XML:
ERROR!
java.lang.NoSuchMethodError: com.sun.org.apache.xml.internal.serialize.OutputFormat.<init>(Lorg/w3c/dom/Document;)V
What could be the problem?
Turns out the box with the failure was running "JDK 11" so fix for me was to temporarily use "JDK 8" instead for now. Appears replacement alternatives are discussed here
See also Serialize DOM to FileOutputStream using Xerces and https://stackoverflow.com/a/9331063/32453 but I don't see an exact replacement.