DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27859>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27859 NPE in ApplicationHttpRequest.getSession Summary: NPE in ApplicationHttpRequest.getSession Product: Tomcat 5 Version: 5.0.19 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I've just been setting up a fairly complex series of webapp. In the process I got the following exceptino and stack trace: java.lang.NullPointerException at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:546) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:512) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:268) ... the offending code is: if (other != null) { Session localSession = null; try { localSession = context.getManager().findSession(other.getId()); localSession.access(); <--- NPE here } catch (IOException e) { // Ignore } localSession above can be null, hence the NPE. it might be that there was something wrong with the configuration I was using that triggered this. still seems like a bug, tho, since the docs for Manager.getSession explicitly allow it to return null. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
