Return-Path: X-Original-To: apmail-flume-user-archive@www.apache.org Delivered-To: apmail-flume-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D5CFE7CA for ; Mon, 14 Jan 2013 05:25:01 +0000 (UTC) Received: (qmail 42371 invoked by uid 500); 14 Jan 2013 05:25:00 -0000 Delivered-To: apmail-flume-user-archive@flume.apache.org Received: (qmail 41955 invoked by uid 500); 14 Jan 2013 05:24:59 -0000 Mailing-List: contact user-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flume.apache.org Delivered-To: mailing list user@flume.apache.org Received: (qmail 41895 invoked by uid 99); 14 Jan 2013 05:24:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 05:24:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of davidsundl@gmail.com designates 209.85.215.177 as permitted sender) Received: from [209.85.215.177] (HELO mail-ea0-f177.google.com) (209.85.215.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 05:24:51 +0000 Received: by mail-ea0-f177.google.com with SMTP id c10so1494600eaa.8 for ; Sun, 13 Jan 2013 21:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WhXllfjXQH9s1nDF9igwblSE/1gZBjakfMJbRNCnB3g=; b=sKYvCpULxy10b32WCKcAVlsMQ9OimBgxc+3xESxEsGlP7zdB6kOHLO2vPSp/1qBsea LqUxBMDpTn5pkJReu/OTR4PgW48YcwgIdB9TNI6nGST86aTeQ0yqY9398kEWLveAB7tm +Bzc6jlaJvgXnDrT3hnM6tAkXBNACXy048VmOayP/dxS/2XeaG2b2UUjyW16ZJcHhI00 whXcq1Ln5RF78lUiFRN8020+AwREVuqCrFUrZdu01HssKWaJWS/SASvahK5XIyghkFXA orV8zL9sNS77pPCkrXNqma2ac8TnfhV6OW/KVY91nHqGcsUmZ6yNW3bL0/GiTpwmrWKB NZCg== MIME-Version: 1.0 Received: by 10.14.221.9 with SMTP id q9mr228801329eep.3.1358141071117; Sun, 13 Jan 2013 21:24:31 -0800 (PST) Received: by 10.14.144.199 with HTTP; Sun, 13 Jan 2013 21:24:30 -0800 (PST) In-Reply-To: <969B118F8FF0104281DFF098C33475404FB63FAF3D@PUNINMSMBX01.puneodc.lntinfotech.com> References: <969B118F8FF0104281DFF098C33475404FB63FAF3D@PUNINMSMBX01.puneodc.lntinfotech.com> Date: Mon, 14 Jan 2013 13:24:30 +0800 Message-ID: Subject: Re: Could not instantiate class org.apache.flume.clients.log4jappender From: Dongliang Sun To: Chhaya Vishwakarma , user@flume.apache.org Content-Type: multipart/alternative; boundary=047d7b6049ba194cff04d338dc08 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6049ba194cff04d338dc08 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Actually I have append the FLUME_HOME/lib/ to my CLASSPATH. Whether there is some problem in my PIG log4j.properties? Do you have any experience using log4jappender on PIG? Thanks, Dongliang 2013/1/14 Chhaya Vishwakarma > Put flume-log4j-appender.jar > in CLASSPATH. Jar can be found in FLUME_HOME/lib/**** > > ** ** > > *From:* =E5=AD=99=E4=B8=9C=E4=BA=AE [mailto:davidsundl@gmail.com] > *Sent:* Monday, January 14, 2013 8:55 AM > *To:* user@flume.apache.org > *Subject:* Could not instantiate class > org.apache.flume.clients.log4jappender**** > > ** ** > > I'm a newbie for the Flume, and I just set up flume for a test. > I want to use the log4jappender to get log info from PIG scripts, the > log4j.properties is:**** > > log4j.appender.flume =3D org.apache.flume.clients.log4jappender.Log4jAppe= nder **** > > log4j.appender.flume.Hostname =3D localhost **** > > log4j.appender.flume.Port =3D 41414 **** > > log4j.logger.org.apache.pig=3DDEBUG,flume**** > > And for the flume.config: **** > > a1.sources =3D r1 **** > > a1.sinks =3D k1 **** > > a1.channels =3D c1 **** > > ** ** > > # Describe/configure the source**** > > a1.sources.r1.type =3D avro **** > > a1.sources.r1.bind =3D localhost **** > > a1.sources.r1.port =3D 41414 **** > > ** ** > > # Describe the sink **** > > a1.sinks.k1.type =3D logger **** > > # Use a channel which buffers events in memory **** > > a1.channels.c1.type =3D memory **** > > a1.channels.c1.capacity =3D 1000 **** > > a1.channels.c1.transactionCapacity =3D 100 **** > > ** ** > > # Bind the source and sink to the channel **** > > a1.sources.r1.channels =3D c1 **** > > a1.sinks.k1.channel =3D c1 **** > > But I got the following error when run a pig script: > java.lang.ClassNotFoundException: > org.apache.flume.clients.log4jappender.Log4jAppender > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at org.apache.log4j.helpers.Loader.loadClass(Loader.java:179) > at > org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionCon= verter.java:320) > at > org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter= .java:121) > at > org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.= java:664) > at > org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.= java:647) > at > org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfi= gurator.java:568) > at > org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.ja= va:442) > at > org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java= :367) > at org.apache.pig.Main.configureLog4J(Main.java:678) > at org.apache.pig.Main.run(Main.java:337) > at org.apache.pig.Main.main(Main.java:111) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.util.RunJar.main(RunJar.java:156) > log4j:ERROR Could not instantiate appender named "flume".**** > > Could you please help me find what I miss or where is incorrect for the > configuration.**** > > Thanks a lot! > Dongliang**** > > ------------------------------ > The contents of this e-mail and any attachment(s) may contain confidentia= l > or privileged information for the intended recipient(s). Unintended > recipients are prohibited from taking action on the basis of information = in > this e-mail and using or disseminating the information, and must notify t= he > sender and delete it from their system. L&T Infotech will not accept > responsibility or liability for the accuracy or completeness of, or the > presence of any virus or disabling code in this e-mail" > --047d7b6049ba194cff04d338dc08 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Actually I have append the FLUME_HOME= /lib/ to my CLASSPATH.
Whether there is some problem in my PIG log= 4j.properties?
Do you have any experience using log4jappender on P= IG?

Thanks,
Dongliang
=


2013/1/1= 4 Chhaya Vishwakarma <Chhaya.Vishwakarma@lntinfotech.com<= /a>>

Put flume-log4j-ap= pender.jar in CLASSPATH. Jar can be found in FLUME_HOME/lib/

=C2=A0

From: =E5=AD=99=E4=B8=9C=E4=BA=AE [mailto:davidsundl@gmail.com= ]
Sent: Monday, January 14, 2013 8:55 AM
To: user@= flume.apache.org
Subject: Could not instantiate class org.apache.flume.clients.log4ja= ppender

=C2=A0

I'm a newbie for the Flume, and I just set up flume for a test.
I want to use the log4jappender to get log info from PIG scripts, the log4j= .properties is:

log4j.appender.flume =3D org.apache.flume.clients.log4jappender.=
Log4jAppender=C2=A0 
log4j.appender.flume.Hostname =3D localhost=C2=A0 =
log4j.appender.flume.Port =3D 41414=C2=A0=C2=A0 
log4j.logger.org.apache.pig=3DDEBUG,flume

And for the flume.config:

a1.sources =3D r1=C2=A0=C2=A0 
a1.sinks =3D k1=C2=A0=C2=A0 
a1.channels =3D c1=C2=A0 
=C2=A0
# Describe/configure the source
a1.sources.r1.type =3D avro=C2=A0=C2=A0 
a1.sources.r1.bind =3D localhost=C2=A0=C2=A0 
a1.sources.r1.port =3D 41414=C2=A0=C2=A0 
=C2=A0
# Describe the sink=C2=A0=C2=A0 
a1.sinks.k1.type =3D logger=C2=A0=C2=A0 
# Use a channel which buffers events in memory=C2=A0=C2=A0 
a1.channels.c1.type =3D memory=C2=A0=C2=A0 =
a1.channels.c1.capacity =3D 1000=C2=A0=C2=A0 
a1.channels.c1.transactionCapacity =3D 100=C2=A0=C2=A0 
=C2=A0
# Bind the source and sink to the channel=C2=A0=C2=A0 =
a1.sources.r1.channels =3D c1=C2=A0=C2=A0 <=
/pre>
a1.sinks.k1.channel =3D c1=C2=A0=C2=A0 

But I got the following error when run a pig script:
java.lang.ClassNotFoundException: org.apache.flume.clients.log4jappender.Lo= g4jAppender
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:179)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionCo= nverter.java:320)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverte= r.java:121)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator= .java:664)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator= .java:647)
at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConf= igurator.java:568)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j= ava:442)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.jav= a:367)
at org.apache.pig.Main.configureLog4J(Main.java:678)
at org.apache.pig.Main.run(Main.java:337)
at org.apache.pig.Main.main(Main.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav= a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor= Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
log4j:ERROR Could not instantiate appender named "flume".<= u>

Could you please help me find what I miss or where is incorrect for the = configuration.

Thanks a lot!
Dongliang



The contents of this e-mail= and any attachment(s) may contain confidential or privileged information f= or the intended recipient(s). Unintended recipients are prohibited from tak= ing action on the basis of information in this e-mail and using or disseminating the information, and must notify= the sender and delete it from their system. L&T Infotech will not acce= pt responsibility or liability for the accuracy or completeness of, or the = presence of any virus or disabling code in this e-mail"

--047d7b6049ba194cff04d338dc08--