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 "Sangjin Lee (JIRA)" <ji...@apache.org> on 2015/06/27 04:05:04 UTC

[jira] [Commented] (HADOOP-12126) Configuration might use ApplicationClassLoader to create XML parser

    [ https://issues.apache.org/jira/browse/HADOOP-12126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603898#comment-14603898 ] 

Sangjin Lee commented on HADOOP-12126:
--------------------------------------

Thanks for the patch [~laurentgo]! It looks like the patch has redundant diffs for the same file? Could you please update the patch? Also, the naming convention for the patch file is \{JIRA-id\}.\{sequence\}.patch (e.g. "HADOOP-12126.001.patch").

> Configuration might use ApplicationClassLoader to create XML parser
> -------------------------------------------------------------------
>
>                 Key: HADOOP-12126
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12126
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>            Reporter: Laurent Goujon
>            Assignee: Laurent Goujon
>         Attachments: HADOOP-12126-1.patch
>
>
> {{org.apache.hadoop.conf.Configuration}} creates a new DocumentBuilder to parse the XML config files, but it doesn't specify which classloader to use to discover and instantiate the XML parser.
> Because DocumentBuilderFactory relies on ServiceProvider, whose by default, uses the context classloader. If classpath isolation is turned on, one might expect that that Configuration will only load classes from the system classloader, but it turns out that the context classloader is set to ApplicationClassLoader, and that a XML parser might be loaded from the user classpath.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)