org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalStateException: Cannot apply org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer@6fc0592c to already built object

Stack Overflow | Dhananjay K | 2 months ago
  1. 0

    getting error Cannot apply DaoAuthenticationConfigurer@6fc0592c to already built object

    Stack Overflow | 2 months ago | Dhananjay K
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalStateException: Cannot apply org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer@6fc0592c to already built object
  2. 0

    getting the error Caused by: java.lang.IllegalStateException: Cannot apply org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer@59abc804 to already built object

    GitHub | 2 months ago | jaykadam
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalStateException: Cannot apply org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer@59abc804 to already built object
  3. 0

    Cannot apply JdbcUserDetailsManagerConfigurer@5a34003b to already built object

    Stack Overflow | 1 year ago | InsaurraldeAP
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cannot apply JdbcUserDetailsManagerConfigurer@5a34003b to already built object | Solutions for enthusiast and professional programmers

    fatal-errors.com | 1 year ago
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
  6. 0

    Error to autowire AuthenticationManager inside OAuth2 configuration class

    Stack Overflow | 1 year ago | Kleber Mota
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat

    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

      Cannot apply org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer@6fc0592c to already built object

      at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.add()
    2. org.springframework.security
      AuthenticationManagerBuilder.userDetailsService
      1. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.add(AbstractConfiguredSecurityBuilder.java:195)
      2. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.apply(AbstractConfiguredSecurityBuilder.java:132)
      3. org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder.apply(AuthenticationManagerBuilder.java:290)
      4. org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder.userDetailsService(AuthenticationManagerBuilder.java:187)
      4 frames
    3. org.sevenforall.app
      SecurityConfig.configure
      1. org.sevenforall.app.security.SecurityConfig.configure(SecurityConfig.java:50)
      1 frame
    4. 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:498)
      4 frames
    5. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:654)
      2. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
      3. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
      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.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      11 frames
    6. 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
    7. 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
    8. Glassfish Core
      ContainerBase$StartChild.call
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4851)
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
      5. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
      5 frames
    9. 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