Bug 33465 - StandardSession.removeAttriube throws NullPointerException
Summary: StandardSession.removeAttriube throws NullPointerException
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 4.1.30
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 14:26 UTC by Andreas Schmidt
Modified: 2005-03-14 16:00 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schmidt 2005-02-09 14:26:47 UTC
from time to time i find the following error messages in the log-files of my
production system:

java.lang.NullPointerException
	at
org.apache.catalina.session.StandardSession.removeAttribute(Ljava.lang.String;Z)V(StandardSession.java:1157)
	at
org.apache.catalina.session.StandardSession.removeAttribute(Ljava.lang.String;)V(StandardSession.java:1103)
	at
org.apache.catalina.session.StandardSessionFacade.removeAttribute(Ljava.lang.String;)V(StandardSessionFacade.java:201)
	at
org.apache.catalina.session.StandardSessionFacade.removeAttribute(Ljava.lang.String;)V(StandardSessionFacade.java:201)


unfortunatly i could never cause the error by myself, i just see it happen by
looking in the log-files. digging into the source-code of removeAttribute points
to these lines:

        // Notify interested application event listeners
        Context context = (Context) manager.getContainer();
        Object listeners[] = context.getApplicationListeners();

the null-pointer-exception is thrown in the line that calls
manager.getContainer(), so it seems manager is null, when it comes to the
exception. i don't know how manager can get null -- maybe i have some
miscounfiguration? so without understanding the details or the implementation, i
looked at the other methods that access manager. most of then check the
manager-variable for a null-value before they access it. so maybe this should be
done here too?
Comment 1 Mark Thomas 2005-02-15 20:43:00 UTC
Please add the rest of the stack trace.
Comment 2 Mark Thomas 2005-03-15 01:00:26 UTC
There has been no response after a month so I am closing this as invalid. I have
reviewed the relevant source code and can't see a path where manager could be
null in normal usage.

I suggest that the best place to follow up on this is the tomcat-user mailing
list (with the full stack trace as a starting point). If that discussion
concludes that there is a bug, this bug report can always be re-opened.