tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee <g...@edamame.stinky.com>
Subject Re: Bug in InvokerServlet: NullPointerException, tomcat totally dies
Date Sat, 03 Jun 2000 22:18:54 GMT

So the problem in InvokerServlet is the same thing: it is trying to
reference an instance variable ("context") which was set in its init()
method, but it's null, which means that the init() method must never
have been called!

(Either that, or some rogue process is using reflection to set a
*private* instance variable... nah, I don't think so.)

I don't know enough about the structure of Tomcat yet to track it much
further.  If this intrigues any developers enough, I can reproduce it
fairly easily; all I need to do is let my server run for 5 or 6 hours.

This definitely qualifies as a bug, right? :-)



Context log: path="/shoppers" Error in invoker service() : null
 java.lang.NullPointerException
	at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:175)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
	at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
	at java.lang.Thread.run(Thread.java:479)



On Sat, Jun 03, 2000 at 10:08:15AM -0700, Alex Chaffee wrote:
> Curiouser and curiouser... 
> 
> Seems the null pointer in my servlet's doGet method is trying to
> dereference an instance variable... that is set in the init method!
> 
> Might Tomcat be getting confused by multiple simultaneous requests,
> accidentally instantiating a new instance, and calling doGet on this
> new instance without calling init?
> 
> More detective work is required...
> 
>  - Alex
> 
> ---
> Alex Chaffee                       mailto:alex@jguru.com
> jGuru - Java News and FAQs         http://www.jguru.com/alex/
> Founder of Purple Technology       http://www.purpletech.com/
> Creator of Gamelan                 http://www.gamelan.com/
> Curator of Stinky Art Collective   http://www.stinky.com/
> 
> 
> On Sat, Jun 03, 2000 at 04:19:28AM -0700, Alex Chaffee wrote:
> > (sending to both lists since I'm not sure where to report bugs these
> > days)
> > 
> > I'm running Tomcat standalone, testing a simple servlet on a (live)
> > medium-load site.  It's tied to an applet that polls once every N
> > seconds; as a result, I'm getting upwards of 8 requests per second,
> > but it seems to be about 2-3 hits per second on average.
> > 
> > It runs fine for hours, then dies silently in the middle of the
> > night. The VM is still running, but doesn't accept any connections.
> > As far as I can tell, the problem is a NullPointerException in
> > InvokerServlet.  I'll try to track it down more carefully by turning
> > off the JIT.
> > 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

-- 
---
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Mime
View raw message