[
https://issues.apache.org/jira/browse/NUTCH-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142048#comment-13142048
]
Lewis John McGibbney commented on NUTCH-1188:
---------------------------------------------
Hi guys, I think it's critical that we get this one ironed out before we begin
firing RC's. Can we confirm that in our trunk 1.4 development code (and in
Nutchgora branch) that this has been sorted out previously and that it is only
an issue in the now deprecated 1.4 branch. 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