org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalStateException: At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())

Stack Overflow | xenoterracide | 5 months ago
  1. 0

    At least one mapping is required, but I think I'm already specifying one

    Stack Overflow | 5 months ago | xenoterracide
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalStateException: At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())
  2. 0

    what's the nested exception mean?

    GitHub | 2 years ago | tianyuanzhonglu
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.servlet.Filter org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalStateException: At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())
  3. 0

    Java plugin - SonarQube Add Custom Rule

    Stack Overflow | 1 year ago | Shruti
    java.lang.IllegalStateException: At least one issue expected
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [1.8][quick fix] IllegalStateException while applying quick fix to change type in lambda

    Eclipse Bugzilla | 3 years ago | manju656
    java.lang.IllegalStateException: must specify at least one linked position
  6. 0

    [quick fix] IllegalStateException after changing type of enum constant

    Eclipse Bugzilla | 1 decade ago | benno.baumgartner
    java.lang.IllegalStateException: must specify at least one linked position

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())

      at org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.createMetadataSource()
    2. org.springframework.security
      WebSecurityConfiguration$$EnhancerBySpringCGLIB$$9048364f$$FastClassBySpringCGLIB$$36df06db.invoke
      1. org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.createMetadataSource(ExpressionUrlAuthorizationConfigurer.java:176)
      2. org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.createMetadataSource(ExpressionUrlAuthorizationConfigurer.java:75)
      3. org.springframework.security.config.annotation.web.configurers.AbstractInterceptUrlConfigurer.configure(AbstractInterceptUrlConfigurer.java:75)
      4. org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.configure(ExpressionUrlAuthorizationConfigurer.java:75)
      5. org.springframework.security.config.annotation.web.configurers.AbstractInterceptUrlConfigurer.configure(AbstractInterceptUrlConfigurer.java:67)
      6. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.configure(AbstractConfiguredSecurityBuilder.java:383)
      7. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:329)
      8. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)
      9. org.springframework.security.config.annotation.web.builders.WebSecurity.performBuild(WebSecurity.java:289)
      10. org.springframework.security.config.annotation.web.builders.WebSecurity.performBuild(WebSecurity.java:74)
      11. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:333)
      12. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)
      13. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:105)
      14. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$9048364f.CGLIB$springSecurityFilterChain$0(<generated>)
      15. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$9048364f$$FastClassBySpringCGLIB$$36df06db.invoke(<generated>)
      15 frames
    3. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    4. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    5. org.springframework.security
      WebSecurityConfiguration$$EnhancerBySpringCGLIB$$9048364f.springSecurityFilterChain
      1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$9048364f.springSecurityFilterChain(<generated>)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    7. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      11. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)
      12. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      13 frames
    8. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
      2 frames
    9. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      3 frames
    10. com.mckesson.dex
      DexContextLoaderListener.contextInitialized
      1. com.mckesson.dex.config.DexContextLoaderListener.contextInitialized(DexContextLoaderListener.java:50)
      1 frame
    11. Glassfish Core
      ContainerBase$StartChild.call
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4809)
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
      5. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
      5 frames
    12. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames