Announcement Announcement Module
Collapse
No announcement yet.
cloneFromHttpSession in HttpSessionContextIntegrationFilter Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • 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?
    http://forum.springsource.org/showth...romHttpSession

    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 [org.springframework.security.context.SecurityConte xtImpl] must be an instance of interface java.lang.Cloneable
    at org.springframework.util.Assert.isInstanceOf(Asser t.java:337)
    at org.springframework.security.context.HttpSessionCo ntextIntegrationFilter.readSecurityContextFromSess ion(HttpSessionContextIntegrationFilter.java:296)
    at org.springframework.security.context.HttpSessionCo ntextIntegrationFilter.doFilterHttp(HttpSessionCon textIntegrationFilter.java:199)
    at org.springframework.security.ui.SpringSecurityFilt er.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java :371)
    at org.springframework.security.util.FilterChainProxy .doFilter(FilterChainProxy.java:174)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:236)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
    at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :96)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:874)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:595)


    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.

    Comment

    Working...
    X