[ https://issues.apache.org/jira/browse/HADOOP-17088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151066#comment-17151066 ]
Steve Loughran commented on HADOOP-17088: ----------------------------------------- the check for isRestricted already executes before this, so I don't see it opening up access mori > Failed to load Xinclude files with relative path in case of loading conf via > URI > -------------------------------------------------------------------------------- > > Key: HADOOP-17088 > URL: https://issues.apache.org/jira/browse/HADOOP-17088 > Project: Hadoop Common > Issue Type: Bug > Reporter: Yushi Hayasaka > Priority: Major > > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org