AccessEvent#247 tries to do httpRequest.getSession(), then check if the return value is null.
However, the no-args getSession() will always return a valid session: it creates it if it is not present. During a log-out (i.e. after we've just destroyed the session), trying to create a new session fails with:
{{ 12:03:35,640 |-ERROR in ch.qos.logback.core.ConsoleAppender[STDOUT] - Appender [STDOUT] failed to append. java.lang.IllegalStateException: Response is committed at java.lang.IllegalStateException: Response is committed at at org.eclipse.jetty.server.Request.getSession(Request.java:1508) at at org.eclipse.jetty.server.Request.getSession(Request.java:1486) at at ch.qos.logback.access.spi.AccessEvent.getSessionID(AccessEvent.java:247) at at ch.qos.logback.access.pattern.SessionIDConverter.convert(SessionIDConverter.java:21) at at ch.qos.logback.access.pattern.SessionIDConverter.convert(SessionIDConverter.java:18) at at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:36) }}
To trigger this, your pattern must contain the %S modifier.
Proposed fix: call the getSession(false) variant, which does not try to create a session if one is not present, and instead hits the null case as the code is expecting.
|