Announcement Announcement Module
Collapse
No announcement yet.
Problem configuring spring security SecurityContextPersistenceFilter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem configuring spring security SecurityContextPersistenceFilter

    Hi,

    I'm trying to use custom SecurityContextRepository to store session data in a persistent layer.

    I'm using hazelcast for persistent layer. The application is working properly if I remove "security-context-repository-ref="securityContextPersistenceFilter"" entry from http config(which means HttpSessionSecurityContextRepository will be used). That means the bean "securityContextPersistenceFilter" itself is getting created properly. But when injected into the filter chain, I'm getting the error mentioned below.

    Here is my configuration xml:

    <http auto-config="false" use-expressions="true"
    entry-point-ref="loginUrlAuthenticationEntryPoint"
    security-context-repository-ref="securityContextPersistenceFilter">

    .................................................. .................

    <beans:bean id="securityContextPersistenceFilter"
    class="org.springframework.security.web.context.Se curityContextPersistenceFilter">
    <beans:constructor-arg ref="webstoreSessionRepository"
    name="repo" />
    </beans:bean>

    And Below is the error I get:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityF ilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.security.web.DefaultSecurityF ilterChain#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.web.context.SecurityC ontextPersistenceFilter] while setting constructor argument with key [2]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)#24': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

    Any suggestions would be immensely appreciated.

    Thanks,
    Nithin.
Working...
X