Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Strange tomcat behavior

Remy Maucherat

2003-10-09

Replies:

ralf.bechtel@(protected):
> Hi everybody on the list!
>
> We observed a strange tomcat behavior (tomcat 4.1.24) while running a servlet: Everything works fine some days or even weeks. Suddenly (and at random time) tomcat throws the following exceptions:
>
> 2003-10-08 11:44:48 CoyoteAdapter An exception or error occurred in the container during the request processing
> java.lang.NullPointerException
>  at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:164)
>  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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:223)
>  at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:594)
>  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
>  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
>  at java.lang.Thread.run (Thread.java:484)
>
> This exception occurs some times. Suddenly tomcat throws another exception:
>
> 2003-10-08 11:46:44 CoyoteAdapter An exception or error occurred in the container during the request processing
> java.lang.NullPointerException
>  at java.lang.String.charAt (String.java:509)
>  at org.apache.tomcat.util.buf.ByteChunk.indexOf (ByteChunk.java:669)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.normalize (CoyoteAdapter.java:578)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest (CoyoteAdapter.java:280)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:221)
>  at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:594)
>  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
>  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
>  at java.lang.Thread.run (Thread.java:484)
>
> Note that there are no user defined classes in the stacktrace. What's the reason of this behavior?

The second one was weirder, so I looked into it:

For the TC 4.1.24 source:

CoyoteAdapter.java:578: index = uriBC.indexOf("/../", 0, 4, index);
For reference: ByteChunk.java:668: public int indexOf( String src, int
srcOff, int srcLen, int myOff ) {
ByteChunk.java:669: char first=src.charAt( srcOff );

If you get a NPE inside charAt on a constant String, I think it means
your VM has issues.

For the first one, the engine associated with the engine valve is null,
which can't happen either, but I can't demonstrate as easily that it's
not a Tomcat bug.

--
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
R�my Maucherat
Senior Developer & Consultant
JBoss Group (Europe) S�RL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.