title: No bean named 'springSecurityFilterChain' is defined
body: <p>When configs are loaded, I get the error</p>
  
  <p>SEVERE: Exception starting filter springSecurityFilterChain
  org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined</p>
  
  <p>My sec-config:</p>
  
  <pre><code>&lt;http use-expressions="true" access-denied-page="/error/casfailed.html" entry-point-ref="headerAuthenticationEntryPoint"&gt;
      &lt;intercept-url pattern="/" access="permitAll"/&gt;
      &lt;!-- &lt;intercept-url pattern="/index.html" access="permitAll"/&gt; --&gt;
      &lt;intercept-url pattern="/index.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/history.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/absence.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/search.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/employees.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/employee.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/contract.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/myforms.html" access="hasAnyRole('HLO','OPISK')"/&gt;
      &lt;intercept-url pattern="/vacationmsg.html" access="hasAnyRole('ROLE_USER')"/&gt;
      &lt;intercept-url pattern="/redirect.jsp" filters="none" /&gt;
      &lt;intercept-url pattern="/error/**" filters="none" /&gt;
      &lt;intercept-url pattern="/layout/**" filters="none" /&gt;
      &lt;intercept-url pattern="/js/**" filters="none" /&gt;
      &lt;intercept-url pattern="/**" access="isAuthenticated()" /&gt;
  
      &lt;!-- session-management invalid-session-url="/absence.html"/ --&gt;
      &lt;!-- logout logout-success-url="/logout.html"/ --&gt;
      &lt;custom-filter ref="ssoHeaderAuthenticationFilter" before="CAS_FILTER"/&gt; &lt;!-- CAS_FILTER ??? --&gt;
  &lt;/http&gt;
  
  &lt;authentication-manager alias="authenticationManager"&gt;
      &lt;authentication-provider ref="doNothingAuthenticationProvider"/&gt;
  &lt;/authentication-manager&gt;
  
  &lt;beans:bean id="doNothingAuthenticationProvider" class="com.nixu.security.sso.web.DoNothingAuthenticationProvider"/&gt;
  &lt;beans:bean id="ssoHeaderAuthenticationFilter" class="com.nixu.security.sso.web.HeaderAuthenticationFilter"&gt;
  &lt;beans:property name="groups"&gt;
      &lt;beans:map&gt;
        &lt;beans:entry key="cn=lake,ou=confluence,dc=utu,dc=fi" value="ROLE_ADMIN"/&gt;
      &lt;/beans:map&gt;
  &lt;/beans:property&gt;
  &lt;/beans:bean&gt;
  &lt;beans:bean id="headerAuthenticationEntryPoint"
              class="com.nixu.security.sso.web.HeaderAuthenticationEntryPoint"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>And web.xml</p>
  
  <pre><code>  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
       /WEB-INF/applicationContext.xml
       /WEB-INF/sec-config.xml
       /WEB-INF/idm-config.xml
       /WEB-INF/ldap-config.xml
      &lt;/param-value&gt;
    &lt;/context-param&gt;
  
  &lt;display-name&gt;KeyCard&lt;/display-name&gt;
  
  
  &lt;context-param&gt;
  &lt;param-name&gt;webAppRootKey&lt;/param-name&gt;
  &lt;param-value&gt;KeyCardAppRoot&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  
    &lt;context-param&gt;
      &lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/log4j.properties&lt;/param-value&gt;
    &lt;/context-param&gt;
  
    &lt;!-- Reads request input using UTF-8 encoding --&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;characterEncodingFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;encoding&lt;/param-name&gt;
        &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;forceEncoding&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
    &lt;/filter&gt;
  
    &lt;filter&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
    &lt;/filter&gt;
  
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;characterEncodingFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  
   &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
  
    &lt;listener&gt;  &lt;!-- this is for session scoped objects --&gt;
      &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.security.web.session.HttpSessionEventPublisher&lt;/listener-class&gt;
    &lt;/listener&gt;
  
    &lt;!-- Handles all requests into the application --&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;KeyCard&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;tiles&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.apache.tiles.web.startup.TilesServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;
          org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
        &lt;/param-name&gt;
        &lt;param-value&gt;
          /WEB-INF/tilesViewContext.xml
        &lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;KeyCard&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
    &lt;session-config&gt;
      &lt;session-timeout&gt;
        120
      &lt;/session-timeout&gt;
    &lt;/session-config&gt;
  
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
    &lt;!-- error-page&gt;
      &lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;
      &lt;location&gt;/WEB-INF/error/error.jsp&lt;/location&gt;
    &lt;/error-page --&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>What's wrong?</p>