Security Top

To help you get access to the material during the current, global COVID-19 crisis, all courses are 30% off until July 2


1. The Problem

This article discusses a Spring Security configuration problem – the application bootstrapping process throwing the following exception:

SEVERE: Exception starting filter springSecurityFilterChain
No bean named 'springSecurityFilterChain' is defined

Further reading:

Introduction to Java Config for Spring Security

A quick and practical guide to Java Config for Spring Security

Spring Security 5 – OAuth2 Login

Learn how to authenticate users with Facebook, Google or other credentials using OAuth2 in Spring Security 5.

Servlet 3 Async Support with Spring MVC and Spring Security

Quick intro to the Spring Security support for async requests in Spring MVC.

2. The Cause

The cause of this exception is straightforward – Spring Security looks for a bean named springSecurityFilterChain (by default), and cannot find it. This bean is required by the main Spring Security Filter – the DelegatingFilterProxy – defined in the web.xml:


This is just a proxy that delegates all its logic to the springSecurityFilterChain bean.

3. The Solution

The most common reason this bean is missing from the context is that the security XML configuration has no <http> element defined:

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


If the XML configuration is using the security namespace – as the example above, then declaring a simple <http> element will ensure that the filter bean is created and everything starts up correctly:

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

Another possible reason is that the security configuration is not imported at all into the overall context of the web application.

If the security XML config file is named springSecurityConfig.xml, make sure the resource is imported:


Or in XML:

<import resource="classpath:springSecurityConfig.xml" />

Finally, the default name of the filter bean can be changed in the web.xml – usually to use an existing Filter with Spring Security:


4. Conclusion

This article discusses a very specific Spring Security problem – the missing filter chain bean – and shows the solutions to this common issue.

Security bottom

To help you get access to the material during the current, global COVID-19 crisis, all courses are 30% off until July 2


Inline Feedbacks
View all comments
Comments are closed on this article!