You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bernard Ligny (JIRA)" <ji...@apache.org> on 2017/03/13 11:43:41 UTC
[jira] [Created] (CAMEL-11000) Property 'accessExternalDTD' is not
recognized by (all) Xerces
Bernard Ligny created CAMEL-11000:
-------------------------------------
Summary: Property 'accessExternalDTD' is not recognized by (all) Xerces
Key: CAMEL-11000
URL: https://issues.apache.org/jira/browse/CAMEL-11000
Project: Camel
Issue Type: Bug
Components: camel-validator
Affects Versions: 2.18.3
Reporter: Bernard Ligny
When upgrading from v2.18.1 to 2.18.3, we encounter a (blocking) regression, preventing routes involving validator component to successfully start.
Indeed, one of the recent validation-related changes is not fully compatible with all versions of Xerces. Especially when deployed on JBoss Wildlfy 10.1.0.Final :-(
*Stack trace*:
{code:java}
Caused by: java.lang.IllegalStateException: org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
at org.apache.camel.processor.validation.SchemaReader.createSchemaFactory(SchemaReader.java:181)
at org.apache.camel.processor.validation.SchemaReader.getSchemaFactory(SchemaReader.java:152)
at org.apache.camel.processor.validation.SchemaReader.createSchema(SchemaReader.java:192)
at org.apache.camel.processor.validation.SchemaReader.loadSchema(SchemaReader.java:84)
at org.apache.camel.component.validator.ValidatorEndpoint.createProducer(ValidatorEndpoint.java:119)
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:574)
... 78 more
Caused by: org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.setProperty(XMLSchemaFactory.java:436)
at __redirected.__SchemaFactory.setProperty(__SchemaFactory.java:143)
at org.apache.camel.processor.validation.SchemaReader.createSchemaFactory(SchemaReader.java:178)
... 83 more
{code}
In particular, in the following code:
{code:java}
protected SchemaFactory createSchemaFactory() {
...
try {
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
} catch (SAXException e) {
LOG.error(e.getMessage(), e);
throw new IllegalStateException(e);
}
}
{code}
Would it be possible to issue a simple warning, rather then raising an exception ?
(>see Oracle recommandations: https://docs.oracle.com/javase/tutorial/jaxp/properties/error.html)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)