You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Charles Ferreira Gonçalves (JIRA)" <ji...@apache.org> on 2011/02/10 00:10:58 UTC
[jira] Updated: (PIG-1697) NullPointerException if log4j.properties
is Used
[ https://issues.apache.org/jira/browse/PIG-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charles Ferreira Gonçalves updated PIG-1697:
--------------------------------------------
Component/s: impl
Labels: logging (was: )
> 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
> Labels: logging
> Attachments: 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