tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BugRat Mail System <tomcat-b...@cortexity.com>
Subject BugRat Report #739 - Problem when I try to store a referance to the session in the context and then when I try to access it in the next request I get NullPointerException
Date Thu, 02 Aug 2001 17:17:23 GMT
----- Sender's Comment -----
Test
----- End Of Sender's Comment ---------------------------
Report URL: <http://znutar.cortexity.com/BugRatViewer/ShowReport/739>

Report #739 Details

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: critical
Confidence: public
Environment: 
   Release: 3.2.1
   JVM Release: java version "1.3.0_01" Java(TM)
   Operating System: Windows 95
   OS Release: 4.00.095 B
   Platform: x86

Synopsis: 
Problem when I try to store a referance to the session in the context and then when I try
to access it in the next request I get NullPointerException

Description:
The same code works just fine on tomcat 3.1.1.

The problem to me appears to be due the fact that I save a referance to the HttpSessionFacade
( HttpSession to the servlet) in the ServletContext.
In the next request when I try to access this object after retrieving it from the context,
tomcat has already called the method recycle() on the facade object and the HttpSession reference
inside the class HttpSessionFacade is null and I end up with NullPointerException. 

========= 8<===== EXCEPTION THROWN==== 8< =====

java.lang.NullPointerException
 at
org.apache.tomcat.facade.HttpSessionFacade.invalidate(HttpSessionFacade.java
:136)
 at TestSessionBehaviour.doPost(TestSessionBehaviour.java:33)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message