pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olga Natkovich (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1697) NullPointerException if log4j.properties is Used
Date Thu, 03 Mar 2011 01:13:36 GMT

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

Olga Natkovich updated PIG-1697:
--------------------------------

    Fix Version/s: 0.9.0

> NullPointerException if log4j.properties is Used
> ------------------------------------------------
>
>                 Key: PIG-1697
>                 URL: https://issues.apache.org/jira/browse/PIG-1697
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Ranjit Mathew
>            Assignee: Laukik Chitnis
>              Labels: logging
>             Fix For: 0.9.0
>
>         Attachments: PIG-1697.patch, pig-issue-1697.tar.gz
>
>
> If I use a {{log4j.properties}} _without_ the magical line:
> bq. log4j.logger.org.apache.pig=WARN, MyAppender
> Pig 0.8.0 crashes on me and I get:
> bq. Details at logfile: /home/ranjit/src/Pig/stage/pig-0.8.0-SNAPSHOT/pig_1288005234464.log
> This file contains:
> {quote}
> Error before Pig is launched
> ----------------------------
> ERROR 2999: Unexpected internal error. null
> java.lang.NullPointerException
> 	at org.apache.pig.Main.configureLog4J(Main.java:605)
> 	at org.apache.pig.Main.run(Main.java:337)
> 	at org.apache.pig.Main.main(Main.java:107)
> ================================================================================
> {quote}
> Line #605 in {{Main.java}} is:
> bq. backendProps.setProperty("log4j.logger.org.apache.pig.level", logLevel.toString());
> and it turns out that {{logLevel}} is NULL in this case. That in turn is because line
#603 contains:
> bq. logLevel = Logger.getLogger("org.apache.pig").getLevel();
> I believe we should use {{Logger.getEffectiveLevel()}} instead.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message