Getting error org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined

I am running NTLM using Spring Security, I am getting the following error

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined

How can I resolve this error?

I have the following defined in web.xml



Update 1

I resolved that error, now I am getting

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'filterSecurityInterceptor' is defined

and I have the following

<bean id="springSecurityFilterChain" class="org.acegisecurity.util.FilterChainProxy">
    <property name="filterInvocationDefinitionSource">
    /**=httpSessionContextIntegrationFilter, exceptionTranslationFilter, ntlmFilter, filterSecurityInterceptor

I changed my applicationContext.xml as follows because like @Sean Patrick Floyd mentioned some elements were old and dead and buried. However I have other errors now which needs to be fixed :-)


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
  <!--<authentication-manager alias="_authenticationManager"></authentication-manager>-->
      <security:user name="testuser" password="PASSWORD" authorities="ROLE_USER, ROLE_ADMIN"/>
      <security:user name="administrator" password="PASSWORD" authorities="ROLE_USER,ROLE_ADMIN"/>
  <bean id="userDetailsAuthenticationProvider"
  <bean id="ntlmEntryPoint"
    <property name="authenticationFailureUrl" value="/accessDenied.jspx"/>
  <bean id="ntlmFilter" class="">
    <security:custom-filter position="NTLM_FILTER"/>
    <property name="stripDomain" value="true"/>
    <property name="defaultDomain" value="domain"/>
    <property name="netbiosWINS" value="domain"/>
    <property name="authenticationManager" ref="_authenticationManager"/>
  <bean id="exceptionTranslationFilter"
    <property name="authenticationEntryPoint" ref="ntlmEntryPoint"/>
  <security:http access-decision-manager-ref="accessDecisionManager"
    <security:intercept-url pattern="/accessDenied.jspx" filters="none"/>
    <security:intercept-url pattern="/**" access="ROLE_USER"/>
  <bean id="accessDecisionManager" class="">
    <property name="allowIfAllAbstainDecisions" value="false"/>
    <property name="decisionVoters">
        <bean id="roleVoter" class=""/>


From the DelegatingFilterProxy docs:

Notice that the filter is actually a DelegatingFilterProxy, and not the class that will actually implement the logic of the filter. What DelegatingFilterProxy does is delegate the Filter's methods through to a bean which is obtained from the Spring application context. This enables the bean to benefit from the Spring web application context lifecycle support and configuration flexibility. The bean must implement javax.servlet.Filter and it must have the same name as that in the filter-name element. Read the Javadoc for DelegatingFilterProxy for more information

You need to define a bean named springSecurityFilterChain that implements javax.servlet.Filter in your application context.

From Getting Started with Security Namespace Configuration:

If you are familiar with pre-namespace versions of the framework, you can probably already guess roughly what's going on here. The <http> element is responsible for creating a FilterChainProxy and the filter beans which it uses. Common problems like incorrect filter ordering are no longer an issue as the filter positions are predefined.

So you need at least A Minimal <http> Configuration

Sean Patrick Floyd is absolutely right but I think it is worth mention one solution, which took to much time for me.

You simply add @ImportResource annotation.

@ComponentScan(basePackages = {""})
public class CompanyWebMvcConfiguration extends WebMvcConfigurerAdapter {


<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns=""
             xmlns:beans="" xmlns:xsi=""

    <http use-expressions="true">
        <access-denied-handler error-page="/error"/>

In Java configuration, you can use the following annotations:

public class MySecurityConfig extends WebSecurityConfigurerAdapter {


That will import the configuration class which defines the springSecurityFilterChain bean.

Please provide spring security file with minimal configuration">

<http auto-config='true'>
    <intercept-url pattern="/**" access="ROLE_USER" />

Need Your Help

Set Font Color, Font Face and Font Size in PHPExcel

php class phpexcel

I'm working in PHPExcel. I'm beginner.When I'm using following code and its working fine.

In C++, should I bother to cache variables, or let the compiler do the optimization? (Aliasing)

c++ performance caching optimization strict-aliasing

Consider the following code (p is of type unsigned char* and bitmap-&gt;width is of some integer type, exactly which is unknown and depends on which version of some external library we're using):