tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Koehnemann <>
Subject NullPointerException in StandardSession w/ Tomcat 4.1.8
Date Thu, 08 Aug 2002 16:45:32 GMT
Hi all,

I'm not sure if this is a developer question.  But, I tried this question on Tomcat user and
didn't receive any responses.  Any help is appreciated.  Thanks.

-------- Original Message --------
Subject: NullPointerException in StandardSession w/ Tomcat 4.1.8
Date: Tue, 06 Aug 2002 17:02:22 -0700
From: Harry Koehnemann <>
Reply-To: Tomcat Users List <>


I'm in need of scaling a webapp in Tomcat to multiple boxes and need to solve the shared servlet
session problem.  We wrote an RMI-based session server 4 years ago and it's been heavily utilized
with several servet engines hitting it.  There is an internal push to keep it as it's been
very reliable at managing and reaping sessions and scale.

I've written a little adapter that extends ManagerBase and overloads interesting methods to
read and write sessions to that existing server.  CreateSession() and addSession() appear
to work fine but the first servlet to call findSession() generates this exception.

	at org.apache.catalina.session.StandardSession.setAttribute(
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(
	at Session1.doGet(Unknown Source)
	at javax.servlet.http.HttpServlet.service(

Looking at CVS, is 

    Context context = (Context) manager.getContainer();

I notice manager is not transient and think that may be my problem.  I'm not sure that StandardSession
objects can be serialized then brought back into the container as I'm attempting.  Can they?
 If so, any pointers on what I might be doing wrong?

Also, I see Tomcat ships with a session manager that appears to share sessions using a multicast
socket.  I assume this manager broadcast all session changes to all other engines.  Does anyone
have performance stats on how much work it is for the engine to receive these sessions as
a site scales.  It seems that adding more servlet engines causes more work for the servlet
engines using this scheme.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message