XmlReader 读取文件异常

java.lang.RuntimeException: Unable to create XMLReader

org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:44)

org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:116)

root cause

java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:189)
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:42)
org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:116)
org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer

 

解决办法:

dom4j.jar和xerces.jar;尤其是后面一个jar包.

你可能感兴趣的:(XmlReader 读取文件异常)