logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Janssen" <a.jans...@videonetworks.com>
Subject RE: TelnetAppender generates NullPointerException
Date Tue, 25 Nov 2003 10:02:41 GMT
Oh, I see in the javadocs that it only needs a port and that is defaulted to
23 anyway.

No help then.

-----Original Message-----
From: Adrian Janssen [mailto:a.janssen@videonetworks.com]
Sent: 25 November 2003 09:59
To: 'Log4J Users List'
Subject: RE: TelnetAppender generates NullPointerException


I know NOTHING about the telnet appender, but it immediately stikes me that
it will need some more configuration information, such as maybe host and
port number?

Cheers
Adrian

-----Original Message-----
From: David.Ventimiglia@wellsfargo.com
[mailto:David.Ventimiglia@wellsfargo.com]
Sent: 24 November 2003 17:59
To: log4j-user@jakarta.apache.org
Subject: TelnetAppender generates NullPointerException


Hello,

I get a NullPointerException when using Log4J's TelnetAppender, and would be
grateful for any clues on how to get it to work properly.  I searched this
mailing list archive and searched Google for references to the
TelnetAppender, but came up empty.  Here's my log4j.properties file:

# Set root logger level to FATAL
log4j.rootLogger=FATAL

# Set servlet logger to DEBUG and attach to A1 and telnet
log4j.logger.com.wellsfargo.marketsmart.servlet=DEBUG, A1, telnet

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# telnet is set to be a TelnetAppender
log4j.appender.telnet=org.apache.log4j.net.TelnetAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

# telnet uses PatternLayout.
log4j.appender.telnet.layout=org.apache.log4j.PatternLayout
log4j.appender.telnet.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n


I have the log4j jar file in the WEB-INF/lib directory of my web
application, the log4j.properties file in the WEB-INF/classes directory, and
am logging from a servlet in the webapp, running in Tomcat4.1.  I'll paste
in the error message I get at the end of this message.  Again, I'm grateful
for any assistance.

Cheers,
David A. Ventimiglia
DSSG
Wells Fargo Bank
415-222-6707
David.Ventimiglia@wellsfargo.com

76119 [http9080-Processor2] DEBUG com.wellsfargo.marketsmart.servlet  -
#Input Parameters
#Mon Nov 24 09:49:34 PST 2003
newSession=true
outlet=WF00001

java.lang.NullPointerException
	at
org.apache.log4j.net.TelnetAppender.append(TelnetAppender.java:89)
	at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
	at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(Append
erAttachableImpl.java:57)
	at org.apache.log4j.Category.callAppenders(Category.java:187)
	at org.apache.log4j.Category.forcedLog(Category.java:372)
	at org.apache.log4j.Category.debug(Category.java:241)
	at
com.wellsfargo.marketsmart.servlet.MapServlet.service(MapServlet.java:306)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
	at java.lang.Thread.run(Thread.java:534)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message