简体   繁体   English

如何克服此类方法错误:com.sun.org.apache.xml.internal.serialize.OutputFormat

[英]how to overcome SuchMethodError: com.sun.org.apache.xml.internal.serialize.OutputFormat

I run into this error on one box but not another, when using code to "pretty print" XML:当使用代码“漂亮地打印”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.原来出现故障的盒子正在运行“JDK 11”,所以对我来说修复是暂时使用“JDK 8”。 Appears replacement alternatives are discussed here似乎在这里讨论了替代方案

I have got this warning: com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release我收到了这个警告:com.sun.org.apache.xml.internal.serialize.OutputFormat 是 Sun 专有的 API,可能会在未来的版本中删除

See also Serialize DOM to FileOutputStream using Xerces and https://stackoverflow.com/a/9331063/32453 but I don't see an exact replacement.另请参阅使用 Xerceshttps://stackoverflow.com/a/9331063/32453 将DOM 序列化为 FileOutputStream ,但我没有看到确切的替代品。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 更改com.sun.org.apache.xml.internal.serialize.XMLSerializer&com.sun.org.apache.xml.internal.serialize.OutputFormat - Change the com.sun.org.apache.xml.internal.serialize.XMLSerializer & com.sun.org.apache.xml.internal.serialize.OutputFormat 我收到此警告:com.sun.org.apache.xml.internal.serialize.OutputFormat是Sun专有API,可能会在将来的版本中删除 - I have got this warning: com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release 如何解决netbean javafx应用程序中不存在com.sun.org.apache.xml.internal.security包 - How to solve com.sun.org.apache.xml.internal.security package does not exist in netbean javafx application 如何使用com.sun.org.apache.xerces.internal.parsers.SAXParser在SAXBuilder中禁用XML外部实体(XEE)处理 - How to disable XML External Entity(XEE) processing in SAXBuilder which using com.sun.org.apache.xerces.internal.parsers.SAXParser JAVA和XML:com.sun.org.apache.xpath.internal.XPathException:无法将#STRING转换为NodeList - JAVA & XML : com.sun.org.apache.xpath.internal.XPathException: Can not convert #STRING to a NodeList java.lang.ClassNotFoundException: com.sun.org.apache.xml.internal.resolver.CatalogManager Java 11 - java.lang.ClassNotFoundException: com.sun.org.apache.xml.internal.resolver.CatalogManager Java 11 Java 8 to openJdk 11 com.sun.org.apache.xml.internal.* types not accessible - Java 8 to openJdk 11 com.sun.org.apache.xml.internal.* types not accessible 包com.sun.org.apache.xml.internal.security.utils.Base64不存在 - Package com.sun.org.apache.xml.internal.security.utils.Base64 does not exist 导入com.sun.org.apache.xpath.internal.operations的问题 - Problems with importing com.sun.org.apache.xpath.internal.operations com.sun.org.apache.xerces.internal.dom.ElementImpl的替代方案 - Alternative to com.sun.org.apache.xerces.internal.dom.ElementImpl
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM