spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darin McBeath <>
Subject Re: Turning off DTD Validation using XML Utils package - Spark
Date Tue, 01 Dec 2015 16:51:51 GMT

The problem isn't really with DTD validation (by default validation is disabled).  The underlying
problem is that the DTD can't be found (which is indicated in your stack trace below).  The
underlying parser will try and retrieve the DTD (regardless of  validation) because things
such as entities could be expressed in the DTD.

I will explore providing access to some of the underlying 'processor' configurations.  For
example, you could provide your own EntityResolver class that could either completely ignore
the Doctype declaration (return a 'dummy' DTD that is completely empty) or you could have
it find 'local' versions (on the workers or in S3 and then cache them locally for performance).

I will post an update when the code has been adjusted.


----- Original Message -----
From: Shivalik <>
Sent: Tuesday, December 1, 2015 8:15 AM
Subject: Turning off DTD Validation using XML Utils package - Spark

Hi Team,

I've been using XML Utils library 
( to parse
XML using XPath in a spark job. One problem I am facing is with the DTDs. My
XML file, has a doctype tag included in it.

I want to turn off DTD validation using this library since I don't have
access to DTD file. Has someone faced this problem before. Please help.

The exception I am getting it is as below:

stage 0.0 (TID 0, localhost):
com.elsevier.spark_xml_utils.xpath.XPathException: I/O error reported by XML
parser processing null: <path>/filename.dtd (No such file or directory)



at com.thomsonreuters.xmlutils.XMLParser.lambda$0(

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message