java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader


Solutions on the web

Solution icon of stackoverflow
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of web
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of coderanch
via Coderanch by Paco Martin Duque, 10 months ago
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of stackoverflow
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of stackoverflow
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of googlegroups
via Google Groups by Alan, 4 months ago
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of web
weblogic.xml.jaxp.RegistryXMLReader cannot be cast to org.xml.sax.XMLReader

Solution icon of github
com.sun.org.apache.xerces.internal.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of web
via com.br by Unknown author, 1 year ago
com.sun.org.apache.xerces.internal.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader

Solution icon of stackoverflow
weblogic.xml.jaxp.RegistryXMLReader cannot be cast to org.xml.sax.XMLReader

Stack trace

java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader
	at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:243)[talledLocalContainer]
	at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:194)[talledLocalContainer]
	at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)[talledLocalContainer]
	at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)[talledLocalContainer]
	at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)[talledLocalContainer]
	at org.dom4j.io.SAXReader.read(SAXReader.java:435)[talledLocalContainer]
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
Caused by: org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)[talledLocalContainer]
	at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)

Caused by: org.dom4j.DocumentException: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser does not implement XMLReader
	at org.dom4j.io.SAXReader.read(SAXReader.java:484)[talledLocalContainer]
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)[talledLocalContainer]
	... 2 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
38 more bugmates