You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ra...@optisoft.de on 2003/10/09 16:03:47 UTC
Strange tomcat behavior
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?
Regards
Ralf
*********************************************************************
OptiSoft GmbH Ralf Bechtel
Pforzheimer Str. 68a mail : ralf.bechtel@optisoft.de
D-75242 Neuhausen phone: +49 7234 9518-51
http://www.optisoft.de fax : +49 7234 9518-44
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Strange tomcat behavior
Posted by Remy Maucherat <re...@jboss.org>.
ralf.bechtel@optisoft.de wrote:
> 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@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org