Exception: java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory can not be cast to javax.xml.parsers.SAXParserFactory


When I deploy my Web Application in the WebLogic it sends the following error:


exception java.lang.ClassCastException:   weblogic.xml.jaxp.RegistrySAXParserFactory can not be cast   javax.xml.parsers.SAXParserFactory

Someone could please guide me as to what may be the reason for this exception.

asked by jose 11.10.2017 в 20:30

1 answer


The basic reason is that the classes are not compatible. Normally this conflict is because of the xml-apis.jar file that is self-included with certain artifact assembly tools, such as maven or ant. If you are using maven remove the reference to xml-apis.jar . If you do not use maven, make sure it does not appear inside your artifact (.war file) in the WEB-INF/lib/ directory.

        <exclusion>  <!-- pon aquí la clase que quieres excluir -->
answered by 11.10.2017 / 21:04