Results 1 to 2 of 2

Thread: ERROR - Exception starting filter springSecurityFilterChain

  1. #1

    Default ERROR - Exception starting filter springSecurityFilterChain

    Hi,
    I am getting the below exception when started my tomcat 6.0 server:

    ERROR - Exception starting filter springSecurityFilterChain
    org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'springSecurityFilterChain' is defined
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeanDefinition(DefaultListab leBeanFactory.java:529)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getMergedLocalBeanDefinition(AbstractB eanFactory.java:1095)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:277 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.context.support.AbstractApplic ationContext.getBean(AbstractApplicationContext.ja va:1097)
    at org.springframework.web.filter.DelegatingFilterPro xy.initDelegate(DelegatingFilterProxy.java:326)
    at org.springframework.web.filter.DelegatingFilterPro xy.initFilterBean(DelegatingFilterProxy.java:236)
    at org.springframework.web.filter.GenericFilterBean.i nit(GenericFilterBean.java:194)
    at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(ApplicationFilterConfig.java:295)
    at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(ApplicationFilterConfig.java:422)
    at org.apache.catalina.core.ApplicationFilterConfig.< init>(ApplicationFilterConfig.java:115)
    at org.apache.catalina.core.StandardContext.filterSta rt(StandardContext.java:4071)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4725)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:525)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)


    My web.xml entries :
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext-security.xml</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFil terProxy</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>


    my applicationContext-security.xml entries:

    <bean id="contextSource"
    class="org.springframework.security.ldap.DefaultSp ringSecurityContextSource">
    <constructor-arg value="ldap://host:345/OU=org1,OU=app1,OU=app2,DC=dc1,DC=dc1,DC=com"/>
    <property name="userDn" value="cn=manager,DC=dc1,DC=dc1,DC=com"/>
    <property name="password" value="password"/>
    </bean>

    <bean id="ldapAuthProvider"
    class="org.springframework.security.ldap.authentic ation.LdapAuthenticationProvider">
    <constructor-arg>
    <bean class="org.springframework.security.ldap.authentic ation.BindAuthenticator">
    <constructor-arg ref="contextSource"/>
    <property name="userDnPatterns">
    <list><value>uid={0},OU=org1,OU=app1,OU=app2</value></list>
    </property>
    </bean>
    </constructor-arg>
    <constructor-arg>
    <bean
    class="org.springframework.security.ldap.userdetai ls.DefaultLdapAuthoritiesPopulator">
    <constructor-arg ref="contextSource"/>
    <constructor-arg value="ou=groups"/>
    <property name="groupRoleAttribute" value="ou"/>
    </bean>
    </constructor-arg>
    </bean>


    Can someone please help here..

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Please use [ code][/code ] tags when posting code, that way it remains readable.

    As the stacktrace mentions there is no spring security related material in there at least not the part that configures the filter. I suggest a read of the reference guide.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •