LOGGER.error("Unable to access schema {}", this.schema, ex);
}
if (is != null) {
final Source src = new StreamSource(is, LOG4J_XSD);
final SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = null;
try {
schema = factory.newSchema(src);
} catch (final SAXException ex) {
LOGGER.error("Error parsing Log4j schema", ex);
}
if (schema != null) {
final Validator validator = schema.newValidator();
try {
validator.validate(new StreamSource(new ByteArrayInputStream(buffer)));
} catch (final IOException ioe) {
LOGGER.error("Error reading configuration for validation", ioe);
} catch (final SAXException ex) {