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/09 23:57:00 UTC

[jira] Commented: (PIG-1697) NullPointerException if log4j.properties is Used

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

Charles Ferreira Gonçalves commented on PIG-1697:
-------------------------------------------------

Guys I'm gotting the exactly same issue.

I will attach some files and scripts that could help reproduce those errors.
I don't know the best approach to reopen the issue. 
If someone could help in this.
Thanks!!!



> NullPointerException if log4j.properties is Used
> ------------------------------------------------
>
>                 Key: PIG-1697
>                 URL: https://issues.apache.org/jira/browse/PIG-1697
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Ranjit Mathew
>
> 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