flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Gonzalez Torres <jlgt1...@gmail.com>
Subject Not being able to log from Flink to Kafka
Date Tue, 10 Oct 2017 20:36:22 GMT
Hi Guys

I am trying to use log4j to log all the info from my Flink Application into
a Kafka Topic. The Flink application is running in cluster mode. but
everytime ran it said:

10/10/2017 10:30:00 AM - log4j:ERROR Could not instantiate class
[org.apache.kafka.log4jappender.KafkaLog4jAppender].
10/10/2017 10:30:00 AM - java.lang.ClassNotFoundException:
org.apache.kafka.log4jappender.KafkaLog4jAppender
10/10/2017 10:30:00 AM - at
java.net.URLClassLoader.findClass(URLClassLoader.java:381)
10/10/2017 10:30:00 AM - at
java.lang.ClassLoader.loadClass(ClassLoader.java:424)
10/10/2017 10:30:00 AM - at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
10/10/2017 10:30:00 AM - at
java.lang.ClassLoader.loadClass(ClassLoader.java:357)
10/10/2017 10:30:00 AM - at java.lang.Class.forName0(Native Method)
10/10/2017 10:30:00 AM - at java.lang.Class.forName(Class.java:264)
10/10/2017 10:30:00 AM - at
org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
10/10/2017 10:30:00 AM - at
org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
10/10/2017 10:30:00 AM - at
org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
10/10/2017 10:30:00 AM - at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:785)
10/10/2017 10:30:00 AM - at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
10/10/2017 10:30:00 AM - at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
10/10/2017 10:30:00 AM - at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
10/10/2017 10:30:00 AM - at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
10/10/2017 10:30:00 AM - at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
10/10/2017 10:30:00 AM - at
org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
10/10/2017 10:30:00 AM - at
org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64)
10/10/2017 10:30:00 AM - at
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
10/10/2017 10:30:00 AM - at
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
10/10/2017 10:30:00 AM - at
org.apache.flink.client.CliFrontend.<clinit>(CliFrontend.java:107)
10/10/2017 10:30:00 AM - log4j:ERROR Could not instantiate appender
named "kafka".


The classpath have the jar for the kafka classes but for some reason
it not being able to use it.

I really appreciate some help

Jose

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message