WAS 8.5: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers.SAXParserFactory
I am deploying a J2EE web application in Websphere Application Server 8.5. The web application has a shared library with all the third party libraries. All the internally coded libraries are inside the WEB-INF/lib folder. The problem is that in only some jsps WAS it is throwing the following exception. I think it is related with xercesImpl-2.8.1.jar but I don't understand why it is throwing this exception and why it is throwing in only some pages. In tomcat it is working perfectly. java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers