so,in conclusion,in order to make it works as fine as you expected,you can do as the following ways to get an XMLReader:
(1)
XMLReader parser=XMLReaderFactory.createXMLReader(String className);
(2)
System.setProperty("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser");
XMLReader parser=XMLReaderFactory.createXMLReader();
(3)
System.setProperty("org.xml.sax.parser","org.apache.xerces.parsers.SAXParser");
XMLReader parser=XMLReaderFactory.createXMLReader();
(4) more directly
XMLReader parser=new org.apache.xerces.parsers.SAXParser();
note that:
1) in case (3),the parser is an instance of ParserAdaptor,it doesn't support the feture "http://xml.org/sax/features/validation",differented from the other cases.
2) in case (2),the class you specified should implement the interface XMLReader, in case (3),the class you specified should implement the interface SAXParser.org.apache.xerces.parsers.SAXParser is applicable in both case.
我是采用第二种办法解决的。
WARN [(ehcache.config.Configurator)] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/tools/eclipse3.1/workspace/osworkflowfromcvs/lib/optional/ehcache.jar!/ehcache-failsafe.xml