欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SAXParserFactoryImpl cast SAXParserFactory异常  

程序员文章站 2022-04-02 23:18:39
...

Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory

 

可增加注解

@PowerMockIgnore({"javax.management.*", "javax.xml.parsers.*",

    "com.sun.org.apache.xerces.internal.jaxp.*", "ch.qos.logback.*", "org.slf4j.*"})