tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@binarix.com>
Subject TC 3.3: Bug in AccessLogInterceptor
Date Fri, 14 Sep 2001 01:20:24 GMT
Just for the fun of it, I've tried to enable AccessLogInterceptor (all
defaults) in server.xml, but it actually causes NullPointerException in
line 199.

Line 199 is:

--------------------------------------------------
fw.write(request.remoteHost().toString());
--------------------------------------------------

the request.remoteHost() returns null here. How do we fix that?

Bojan

PS. Here is the stack trace:

--------------------------------------------------
2001-09-14 10:55:52 - Ctx() : Exception in R(  + /contact/inquiry.vm +
null) - java.lang.NullPointerException
        at java.io.Writer.write(Writer.java:129)
        at
org.apache.tomcat.modules.loggers.AccessLogInterceptor.beforeCommit(AccessLogInterceptor.java:199)
        at
org.apache.tomcat.core.OutputBuffer.realWriteBytes(OutputBuffer.java:184)
        at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
        at
org.apache.tomcat.core.OutputBuffer.flush(OutputBuffer.java:318)
        at
org.apache.tomcat.core.Response.flushBuffer(Response.java:402)
        at
org.apache.tomcat.facade.HttpServletResponseFacade.flushBuffer(HttpServletResponseFacade.java:295)
        at com.binarix.velocity.PumpServlet.doPost(PumpServlet.java:453)
        at com.binarix.velocity.PumpServlet.doGet(PumpServlet.java:151)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:497)
        at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
        at org.apache.tomcat.core.Handler.service(Handler.java:235)
        at
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:915)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:831)
        at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:167)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:517)
        at java.lang.Thread.run(Thread.java:484)
--------------------------------------------------

Mime
View raw message