org.springframework.security.config.annotation.AlreadyBuiltException: This object has already been built

Stack Overflow | Code Stone | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    SpringBoot Project cause exception:This object has already been buit

    Stack Overflow | 7 months ago | Code Stone
    org.springframework.security.config.annotation.AlreadyBuiltException: This object has already been built
  2. 0

    GitHub comment 73#158355993

    GitHub | 1 year ago | timwebster9
    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 org.springframework.security.config.annotation.AlreadyBuiltException: This object has already been built
  3. 0

    GitHub comment 45#158816049

    GitHub | 1 year ago | timwebster9
    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 org.springframework.security.config.annotation.AlreadyBuiltException: This object has already been built
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Security OAuth2 - @EnableOauth2Sso but accept tokens as authentication, too

    Stack Overflow | 1 year ago | Yannic Klem
    org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is org.springframework.security.config.annotation.AlreadyBuiltException: This object has already been built
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. org.springframework.security.config.annotation.AlreadyBuiltException

    This object has already been built

    at org.springframework.security.config.annotation.AbstractSecurityBuilder.build()
  2. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26eb522a$$FastClassBySpringCGLIB$$f30a5b58.invoke
    1. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:44)[spring-security-config-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    2. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:105)[spring-security-config-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    3. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26eb522a.CGLIB$springSecurityFilterChain$4(<generated>)[spring-security-config-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    4. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26eb522a$$FastClassBySpringCGLIB$$f30a5b58.invoke(<generated>)[spring-security-config-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    4 frames
  3. Spring Core
    MethodProxy.invokeSuper
    1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    1 frame
  4. Spring Context
    ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
    1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    1 frame
  5. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26eb522a.springSecurityFilterChain
    1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$26eb522a.springSecurityFilterChain(<generated>)[spring-security-config-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_77]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[na:1.8.0_77]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[na:1.8.0_77]
    4. java.lang.reflect.Method.invoke(Unknown Source)[na:1.8.0_77]
    4 frames
  7. Spring Beans
    SimpleInstantiationStrategy.instantiate
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    1 frame