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.IllegalArgumentException: Cannot pass a null GrantedAuthority collection

Stack Overflow | zoram | 4 months ago
  1. 0

    Spring Boot Security - java.lang.IllegalArgumentException: Cannot pass a null GrantedAuthority collection

    Stack Overflow | 4 months ago | zoram
    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.IllegalArgumentException: Cannot pass a null GrantedAuthority collection
  2. 0

    JMS message listener error

    Stack Overflow | 8 months ago | user3649231
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appConfig': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.apache.activemq.ActiveMQConnectionFactory kr.ac.jbnu.sql.rded.config.AppConfig.amqFactory; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'amqConnectionFactory' defined in class path resource [kr/ac/jbnu/sql/rded/config/AppConfig.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [javax.jms.ConnectionFactory]: Error creating bean with name 'cachingConnectionFactory' defined in class path resource [kr/ac/jbnu/sql/rded/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.jms.connection.CachingConnectionFactory]: Circular reference involving containing bean 'appConfig' - consider declaring the factory method as static for independence from its containing instance. Factory method 'cachingConnectionFactory' threw exception; nested exception is java.lang.IllegalArgumentException: Target ConnectionFactory must not be null; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cachingConnectionFactory' defined in class path resource [kr/ac/jbnu/sql/rded/config/AppConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.jms.connection.CachingConnectionFactory]: Circular reference involving containing bean 'appConfig' - consider declaring the factory method as static for independence from its containing instance. Factory method 'cachingConnectionFactory' threw exception; nested exception is java.lang.IllegalArgumentException: Target ConnectionFactory must not be null
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 10#249454159

    GitHub | 2 months ago | MelisaLang
    java.lang.IllegalArgumentException: HTTP URL must not be null
  5. 0

    RemoteFileTemplate throws 'remoteDirectoryExpression' is required when using SftpOutboundGateway

    Stack Overflow | 1 year ago | Jimmersons
    java.lang.IllegalArgumentException: 'remoteDirectoryExpression' is required
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.IllegalArgumentException

    Cannot pass a null GrantedAuthority collection

    at org.springframework.util.Assert.notNull()
  2. Spring Core
    Assert.notNull
    1. org.springframework.util.Assert.notNull(Assert.java:115)[spring-core-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    1 frame
  3. spring-security-core
    User.<init>
    1. org.springframework.security.core.userdetails.User.sortAuthorities(User.java:150)[spring-security-core-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.core.userdetails.User.<init>(User.java:110)[spring-security-core-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2 frames
  4. org.springframework.security
    WebSecurityConfigurerAdapter.init
    1. org.springframework.security.config.annotation.authentication.configurers.provisioning.UserDetailsManagerConfigurer$UserDetailsBuilder.build(UserDetailsManagerConfigurer.java:263)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.config.annotation.authentication.configurers.provisioning.UserDetailsManagerConfigurer$UserDetailsBuilder.access$000(UserDetailsManagerConfigurer.java:84)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    3. org.springframework.security.config.annotation.authentication.configurers.provisioning.UserDetailsManagerConfigurer.initUserDetailsService(UserDetailsManagerConfigurer.java:61)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    4. org.springframework.security.config.annotation.authentication.configurers.userdetails.UserDetailsServiceConfigurer.configure(UserDetailsServiceConfigurer.java:48)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    5. org.springframework.security.config.annotation.authentication.configurers.userdetails.UserDetailsServiceConfigurer.configure(UserDetailsServiceConfigurer.java:35)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    6. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.configure(AbstractConfiguredSecurityBuilder.java:383)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    7. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:329)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    8. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    9. org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration.getAuthenticationManager(AuthenticationConfiguration.java:81)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    10. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.authenticationManager(WebSecurityConfigurerAdapter.java:237)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    11. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:175)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    12. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:290)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    13. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:67)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    13 frames
  5. com.example.config
    SecurityConfig$$EnhancerBySpringCGLIB$$838a4505.init
    1. com.example.config.SecurityConfig$$EnhancerBySpringCGLIB$$838a4505.init(<generated>)[classes/:na]
    1 frame
  6. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$36de5a36$$FastClassBySpringCGLIB$$5961a67e.invoke
    1. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:370)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:324)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    3. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    4. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:105)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    5. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$36de5a36.CGLIB$springSecurityFilterChain$3(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    6. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$36de5a36$$FastClassBySpringCGLIB$$5961a67e.invoke(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    6 frames
  7. Spring Core
    MethodProxy.invokeSuper
    1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    1 frame
  8. Spring Context
    ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
    1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    1 frame
  9. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$36de5a36.springSecurityFilterChain
    1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$36de5a36.springSecurityFilterChain(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_25]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_25]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_25]
    4. java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_25]
    4 frames
  11. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    10 frames
  12. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)[spring-context-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    1 frame
  13. Spring
    GenericFilterBean.init
    1. org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:326)[spring-web-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    2. org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:235)[spring-web-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3. org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:199)[spring-web-4.2.7.RELEASE.jar:4.2.7.RELEASE]
    3 frames
  14. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)[tomcat-embed-core-8.0.36.jar:8.0.36]
    2. org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:109)[tomcat-embed-core-8.0.36.jar:8.0.36]
    3. org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4689)[tomcat-embed-core-8.0.36.jar:8.0.36]
    4. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5329)[tomcat-embed-core-8.0.36.jar:8.0.36]
    5. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)[tomcat-embed-core-8.0.36.jar:8.0.36]
    6. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)[tomcat-embed-core-8.0.36.jar:8.0.36]
    7. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)[tomcat-embed-core-8.0.36.jar:8.0.36]
    7 frames
  15. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_25]
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_25]
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_25]
    4. java.lang.Thread.run(Thread.java:745)[na:1.8.0_25]
    4 frames