HTTP Status 500 – No bean named ‘springSecurityFilterChain’ is defined

HTTP Status 500 – No bean named ‘springSecurityFilterChain’ is defined

Trace:

HTTP Status 500 - No bean named 'springSecurityFilterChain' is defined
type Exception report
message No bean named 'springSecurityFilterChain' is defined
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:701)
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1180)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1082)
org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:326)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:255)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.59 logs.
Apache Tomcat/7.0.59

Solutions:

It’s indicate that spring security bean has not been created and spring security trying find that bean with name ‘springSecurityFilterChain’,

To Resolve following error please check following things are available in your web.xml or not?

First:

org.springframework.web.context.ContextLoaderListener Listener should be in your web.xml file.

JavaDeveloperZone is the group of innovative software developers. We are expert in Java JEE and BigData application development. Our contributions will help Java developers and make development journey easy. Feel free to ask any question and suggestion. Always have space for improvement !
We are also providing software application development as service. Contact us