Mubashir Kazia created FLUME-2271:
-------------------------------------
Summary: Log4j appender source can cause NullPointerException even
in Unsafe mode
Key: FLUME-2271
URL: https://issues.apache.org/jira/browse/FLUME-2271
Project: Flume
Issue Type: Bug
Components: Client SDK
Affects Versions: v1.4.0
Reporter: Mubashir Kazia
If a client program is configured to use Log4J appender in unsafe mode and if
the source was available when the client program started but became unavailable
afterwards, Log4J appender can cause a NullPointerException. The stack trace is
as follows.
2013-12-11 15:20:36,619 ERROR [STDERR] (Thread-23) Exception in thread
"Thread-23"
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23)
java.lang.NullPointerException
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.flume.clients.log4jappender.Log4jAppender.append(Log4jAppender.java:163)
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.log4j.Category.callAppenders(Category.java:203)
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.log4j.Category.forcedLog(Category.java:388)
2013-12-11 15:20:36,620 ERROR [STDERR] (Thread-23) at
org.apache.log4j.Category.log(Category.java:853)
I have developed a fix that'll will address this problem. I'll attach the patch
shortly.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)