Return-Path: X-Original-To: apmail-nutch-dev-archive@www.apache.org Delivered-To: apmail-nutch-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CBB478B4 for ; Tue, 1 Nov 2011 15:35:54 +0000 (UTC) Received: (qmail 47963 invoked by uid 500); 1 Nov 2011 15:35:53 -0000 Delivered-To: apmail-nutch-dev-archive@nutch.apache.org Received: (qmail 47899 invoked by uid 500); 1 Nov 2011 15:35:53 -0000 Mailing-List: contact dev-help@nutch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nutch.apache.org Delivered-To: mailing list dev@nutch.apache.org Received: (qmail 47812 invoked by uid 99); 1 Nov 2011 15:35:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 15:35:53 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 15:35:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 703C532C1FF for ; Tue, 1 Nov 2011 15:35:32 +0000 (UTC) Date: Tue, 1 Nov 2011 15:35:32 +0000 (UTC) From: "Lewis John McGibbney (Commented) (JIRA)" To: dev@nutch.apache.org Message-ID: <1716630798.46066.1320161732461.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1536001132.45948.1320159812265.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (NUTCH-1188) ERROR util.LogUtil - Cannot log with method [null] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NUTCH-1188?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1314= 1240#comment-13141240 ]=20 Lewis John McGibbney commented on NUTCH-1188: --------------------------------------------- Thank you for this patch. In the short term, when we get one other +1, I wo= uld like to commit. Can I ask you to have a look @ NUTCH-1138 and comment o= n whether the patch is any use for your activities. It is our vision to rem= ove LogUtil and use the Slf4j/Log4j framework for all logging. Thank you very much for this patch. =20 > 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 =3D Logger.class.getMethod("error", new Class[] { Object.class = }); > but the Logger has no such method=EF=BC=8Cthe correct method is=EF=BC=9A > void org.slf4j.Logger.error(String msg) > So=EF=BC=8CLogUtil's static fields are not initialized correctly(they are= null) > ------------------------------- > Run crawl=EF=BC=8Cyou will find msg in hadoop.log=EF=BC=9A > 2011-11-01 22:38:14,442 ERROR util.LogUtil - Cannot log with method [= null] > java.lang.NullPointerException > =09at org.apache.nutch.util.LogUtil$1.flush(LogUtil.java:103) > =09at java.io.PrintStream.write(PrintStream.java:432) > =09at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202) > =09at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272) > =09at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85) > =09at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168) > =09at java.io.PrintStream.newLine(PrintStream.java:496) > =09at java.io.PrintStream.println(PrintStream.java:757) > =09at java.lang.Throwable.printStackTraceAsCause(Throwable.java:492) > =09at java.lang.Throwable.printStackTrace(Throwable.java:468) > =09at org.apache.nutch.protocol.http.api.HttpBase.getProtocolOutput(HttpB= ase.java:197) > =09at org.apache.nutch.fetcher.Fetcher$FetcherThread.run(Fetcher.java:665= ) > ---------------------------- > Patch: > FATAL =3D 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 administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira