Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
mgoedhart
Contributor III
Contributor III

XML Schema validation in Talend ESB 8.0.1

Hi,

I want to use a schema validation in my talend route like this (cMessagingEndpoint)

"validator:xsd/myschema.xsd"

This works in the Talend 8 studio, but deploying it to the Talend runtime generates an error:

Blueprint Event Dispatcher: 1 | rocessor.validation.SchemaReader 186 | 144 - org.apache.camel.camel-xml-jaxp - 3.11.1 | Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

The same route works in Talend 7.3.1. There I had to add a cConfig component for deployment with the following code:

//Fix for XSD bug on deployment
java.util.Map<String, String> properties = new java.util.HashMap<String, String>();
properties.put("CamelXmlValidatorAccessExternalDTD", "true");
camelContext.setProperties(properties);

 

How to make it work in Talend 8 ?

Regards, Marius

Labels (2)
2 Solutions

Accepted Solutions
Xiaodi_Shi
Support
Support

Hello,

Could you please let us know if this official support article helps?

https://community.qlik.com/t5/Official-Support-Articles/Property-http-javax-xml-XMLConstants-propert...

Best regards

Sabrina

View solution in original post

mgoedhart
Contributor III
Contributor III
Author

To suppress these warnings in Talend ESB 8 so that they don't fill up the tesb.log files, edit the RUNTIME-HOME/etc/org.ops4j.pax.logging.cfg file and add the following lines:

log4j2.logger.validatingProcessor.name = org.apache.camel.support.processor.validation.ValidatingProcessor
log4j2.logger.validatingProcessor.level = ERROR

log4j2.logger.schemaReader.name = org.apache.camel.support.processor.validation.SchemaReader
log4j2.logger.schemaReader.level = ERROR

 

View solution in original post

5 Replies
Xiaodi_Shi
Support
Support

Hello,

Could you please try to deny reference to external schemas to see if it works?

You could set system property "javax.xml.accessExternalSchema=false" to deny references to external schemas;
System property can be set in Runtime configuration file "{runtime}/etc/system.properties"

Feel free to let us know if it helps.

Best regards

Sabrina

 

mgoedhart
Contributor III
Contributor III
Author

Hello,

Thanks for your response

Unfortunately that system property didn't work. The same error occurs.

I have added the full error in the attachment test.log

Best regards

Marius

Xiaodi_Shi
Support
Support

Hello,

Could you please let us know if this official support article helps?

https://community.qlik.com/t5/Official-Support-Articles/Property-http-javax-xml-XMLConstants-propert...

Best regards

Sabrina

mgoedhart
Contributor III
Contributor III
Author

Hi,

I just noticed that it's a warning. Not an error 😞 apologies.

Unfortunately the official support article doesn't suppress the warning. 

I will also respond to that article

Best regards,

Marius

mgoedhart
Contributor III
Contributor III
Author

To suppress these warnings in Talend ESB 8 so that they don't fill up the tesb.log files, edit the RUNTIME-HOME/etc/org.ops4j.pax.logging.cfg file and add the following lines:

log4j2.logger.validatingProcessor.name = org.apache.camel.support.processor.validation.ValidatingProcessor
log4j2.logger.validatingProcessor.level = ERROR

log4j2.logger.schemaReader.name = org.apache.camel.support.processor.validation.SchemaReader
log4j2.logger.schemaReader.level = ERROR