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 "Todd Lipcon (JIRA)" <ji...@apache.org> on 2014/01/25 20:54:38 UTC

[jira] [Updated] (HADOOP-10288) Explicit reference to Log4JLogger breaks non-log4j users

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

Todd Lipcon updated HADOOP-10288:
---------------------------------

    Attachment: hadoop-10288.txt

Here's a candidate patch. It's not possible to unit test this beyond the existing unit tests which cover this path. I'm awaiting confirmation from the downstream consumer that had the build issue that this fixes their issue.

> Explicit reference to Log4JLogger breaks non-log4j users
> --------------------------------------------------------
>
>                 Key: HADOOP-10288
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10288
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 2.4.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hadoop-10288.txt
>
>
> In HttpRequestLog, we make an explicit reference to the Log4JLogger class for an instanceof check. If the log4j implementation isn't actually on the classpath, the instanceof check throws NoClassDefFoundError instead of returning false. This means that dependent projects that don't use log4j can no longer embed HttpServer -- typically this is an issue when they use MiniDFSCluster as part of their testing.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)