Announcement Announcement Module
No announcement yet.
cloneFromHttpSession in HttpSessionContextIntegrationFilter Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • cloneFromHttpSession in HttpSessionContextIntegrationFilter

    I'm a little unsure as to when to set cloneFromHttpSession=true in the HttpSessionContextIntegrationFilter.

    The post below suggests to set this to deal with concurrency issues, but can you please be a little more specific?

    For example, we also use the AnonymousProcessingFilter and have a "concurrency issue". Setting cloneFromHttpSession = true along with removeAfterRequest to false (in the AnonymousProcessingFitler) seems to resolve this issue, but at the expense of now not being to login to our webapp. Instead, when trying to login I get an error that reads:

    java.lang.IllegalArgumentException: Context must implement Clonable and provide a Object.clone() methodObject of class [ xtImpl] must be an instance of interface java.lang.Cloneable
    at org.springframework.util.Assert.isInstanceOf(Asser
    at ntextIntegrationFilter.readSecurityContextFromSess ion(
    at ntextIntegrationFilter.doFilterHttp(HttpSessionCon
    at er.doFilter(
    at $VirtualFilterChain.doFilter( :371)
    at .doFilter(
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal( :96)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.apache.catalina.core.StandardWrapperValve.invo ke(
    at org.apache.catalina.core.StandardContextValve.invo ke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke (
    at org.apache.catalina.core.StandardEngineValve.invok e(
    at org.apache.catalina.connector.CoyoteAdapter.servic e(
    at org.apache.coyote.http11.Http11Processor.process(H
    at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt
    at Socket(
    at ead.runIt(
    at org.apache.tomcat.util.threads.ThreadPool$ControlR

    The filter ordering we have (in filterChainProxy) is:

    httpSessionContextIntegrationFilter,logoutFilter,a uthenticationProcessingFilter,remoteUserFilter,rem emberMeProcessingFilter,anonymousProcessingFilter, exceptionTranslationFilter,filterInvocationInterce ptor

    Any help would be appreciated. Thanks in advance.

  • #2
    I ended up setting removeAfterRequest to false in the anonymousProcessingFilter and that worked.