nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Nioche (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-1188) ERROR util.LogUtil - Cannot log with method [null]
Date Tue, 01 Nov 2011 16:03:32 GMT

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

Julien Nioche commented on NUTCH-1188:
--------------------------------------

+1 to commit. See corresponding class in branch nutchgora
Thanks
                
> ERROR util.LogUtil - Cannot log with method [null]
> --------------------------------------------------
>
>                 Key: NUTCH-1188
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1188
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.4
>         Environment: no special enviroment
>            Reporter: Zhang JinYan
>         Attachments: LogUtil.patch
>
>
> LogUtil has static fields,which is initialized like this:
>     FATAL = Logger.class.getMethod("error", new Class[] { Object.class });
> but the Logger has no such method,the correct method is:
>     void org.slf4j.Logger.error(String msg)
> So,LogUtil's static fields are not initialized correctly(they are null)
> -------------------------------
> Run crawl,you will find msg in hadoop.log:
>     2011-11-01 22:38:14,442 ERROR util.LogUtil - Cannot log with method [null]
>     java.lang.NullPointerException
> 	at org.apache.nutch.util.LogUtil$1.flush(LogUtil.java:103)
> 	at java.io.PrintStream.write(PrintStream.java:432)
> 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
> 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
> 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)
> 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)
> 	at java.io.PrintStream.newLine(PrintStream.java:496)
> 	at java.io.PrintStream.println(PrintStream.java:757)
> 	at java.lang.Throwable.printStackTraceAsCause(Throwable.java:492)
> 	at java.lang.Throwable.printStackTrace(Throwable.java:468)
> 	at org.apache.nutch.protocol.http.api.HttpBase.getProtocolOutput(HttpBase.java:197)
> 	at org.apache.nutch.fetcher.Fetcher$FetcherThread.run(Fetcher.java:665)
> ----------------------------
> Patch:
>     FATAL = Logger.class.getMethod("error", new Class[] { String.class });

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message