You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (Jira)" <ji...@apache.org> on 2020/09/21 18:10:00 UTC

[jira] [Updated] (HADOOP-17088) Failed to load XInclude files with relative path.

     [ https://issues.apache.org/jira/browse/HADOOP-17088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Loughran updated HADOOP-17088:
------------------------------------
    Summary: Failed to load XInclude files with relative path.  (was: Failed to load Xinclude files with relative path in case of loading conf via URI)

> Failed to load XInclude files with relative path.
> -------------------------------------------------
>
>                 Key: HADOOP-17088
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17088
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Yushi Hayasaka
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> When we create a configuration file, which load a external XML file with relative path, and try to load it via calling `Configuration.addResource` with `Path(URI)`, we got an error, which failed to load a external XML, after https://issues.apache.org/jira/browse/HADOOP-14216 is merged.
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Fetch fail on include for 'mountTable.xml' with no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
> 	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
> 	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
> 	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
> 	at org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
> 	at com.company.test.Main.main(Main.java:29)
> Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' with no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
> 	at org.apache.hadoop.conf.Configuration$Parser.handleEndElement(Configuration.java:3271)
> 	at org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3331)
> 	at org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3114)
> 	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3007)
> 	... 4 more
> {noformat}
> The cause is that the URI is passed as string to java.io.File constructor and File does not support the file URI, so my suggestion is trying to convert from string to URI at first.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org