3

Anyone know why I'm hitting below exception for the following code. I'm using Java 6.

final XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setFeature("http://xml.org/sax/features/validation", doValidate);
reader.setFeature("http://apache.org/xml/features/validation/schema", doValidate);
reader.setFeature("http://apache.org/xml/features/standard-uri-conformant", doValidate);


org.xml.sax.SAXNotRecognizedException: Feature 'http://apache.org/xml/features/standard-uri-conformant' is not recognized
DarVar
  • 16,882
  • 29
  • 97
  • 146

2 Answers2

6

Found solution:

Added xercesImpl 2.9.1 to my classpath instead of using the internal Java 6 bundled version of Xerces.

DarVar
  • 16,882
  • 29
  • 97
  • 146
1

Got this issue while doing Integration of Spring and Rest Webservice Jersey

Solution

Removed the following jars
xerces-2.6.2.jar
xercesImpl-2.11.0.jar
xml-apis.jar

Added

jaxp-api-1.4.2.jar

Anurag
  • 41
  • 3