java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty

Spring JIRA | Ronny Løvtangen | 2 years ago
  1. 0

    Does 'sn' need to be required when creating LdapUserDetails? We have a few test users in Active Directory that does not have this attribute set. When those users try to login, it fails on this method in Person.java: {code:title=Person.java} public LdapUserDetails createUserDetails() { Person p = (Person) super.createUserDetails(); Assert.hasLength(p.sn); Assert.notNull(p.cn); Assert.notEmpty(p.cn); // TODO: Check contents for null entries return p; } {code} https://github.com/spring-projects/spring-security/blob/master/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java#L129 It is this line that is causing us problem: {code} Assert.hasLength(p.sn); {code} There might be a good reason that 'sn' is required that I'm not aware of, but if not it would be great if this assert could be removed. This is the stacktrace we get. We're using spring-security-ldap indirectly through Grails spring-security-ldap plugin (v2.0-RC2): {code} 2014-10-29 15:17.02,875 [ajp-nio-8021-exec-3] ERROR StackTrace - Full Stack Trace:java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.util.Assert.hasLength(Assert.java:148) at org.springframework.security.ldap.userdetails.Person$Essence.createUserDetails(Person.java:129) at org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper.mapUserFromContext(InetOrgPersonContextMapper.java:37) at org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider.authenticate(AbstractLdapAuthenticationProvider.java:63) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156) at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.attemptAuthentication(RequestHolderAuthenticationFilter.java:76) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)2014-10-29 15:17.02,928 [ajp-nio-8021-exec-3] ERROR StackTrace - Full Stack Trace:java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.attemptAuthentication(RequestHolderAuthenticationFilter.java:76) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    Spring JIRA | 2 years ago | Ronny Løvtangen
    java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty
  2. 0

    Does 'sn' need to be required when creating LdapUserDetails? We have a few test users in Active Directory that does not have this attribute set. When those users try to login, it fails on this method in Person.java: {code:title=Person.java} public LdapUserDetails createUserDetails() { Person p = (Person) super.createUserDetails(); Assert.hasLength(p.sn); Assert.notNull(p.cn); Assert.notEmpty(p.cn); // TODO: Check contents for null entries return p; } {code} https://github.com/spring-projects/spring-security/blob/master/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java#L129 It is this line that is causing us problem: {code} Assert.hasLength(p.sn); {code} There might be a good reason that 'sn' is required that I'm not aware of, but if not it would be great if this assert could be removed. This is the stacktrace we get. We're using spring-security-ldap indirectly through Grails spring-security-ldap plugin (v2.0-RC2): {code} 2014-10-29 15:17.02,875 [ajp-nio-8021-exec-3] ERROR StackTrace - Full Stack Trace:java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.util.Assert.hasLength(Assert.java:148) at org.springframework.security.ldap.userdetails.Person$Essence.createUserDetails(Person.java:129) at org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper.mapUserFromContext(InetOrgPersonContextMapper.java:37) at org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider.authenticate(AbstractLdapAuthenticationProvider.java:63) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156) at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.attemptAuthentication(RequestHolderAuthenticationFilter.java:76) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)2014-10-29 15:17.02,928 [ajp-nio-8021-exec-3] ERROR StackTrace - Full Stack Trace:java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.attemptAuthentication(RequestHolderAuthenticationFilter.java:76) at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    Spring JIRA | 2 years ago | Ronny Løvtangen
    java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty
  3. 0

    I attempted to configure the active-directory plugin in various ways and saw many failures when clicking the Test button. Eventually I succeeded in a Test by specifying the correct domain name and leaving all the Advanced fields blank. But upon clicking Save, the Oops page came up displaying the following error: org.jvnet.hudson.reactor.ReactorException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) at jenkins.model.Jenkins.executeReactor(Jenkins.java:910) at jenkins.model.Jenkins.<init>(Jenkins.java:806) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$3.run(WebAppMain.java:221) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at hudson.util.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:94) at hudson.util.spring.BeanBuilder.createApplicationContext(BeanBuilder.java:388) at hudson.plugins.active_directory.ActiveDirectorySecurityRealm.createSecurityComponents(ActiveDirectorySecurityRealm.java:131) at hudson.security.SecurityRealm.getSecurityComponents(SecurityRealm.java:398) at hudson.security.HudsonFilter.reset(HudsonFilter.java:134) at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2050) at jenkins.model.Jenkins$20.run(Jenkins.java:2618) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) ... 32 more Caused by: java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.util.Assert.hasLength(Assert.java:148) at org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider.afterPropertiesSet(RememberMeAuthenticationProvider.java:56) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 37 more And now, after restarting Jenkins, it fails to start and displays this same error with no way to get back to my previous configuration (no security configured). Also, there was no option to choose a version other than 'current'. I'm actually running 1.532.1, but didn't see anything related in the change logs, so I haven't tried upgrading to the latest.

    Jenkins JIRA | 3 years ago | Robert Campbell
    org.jvnet.hudson.reactor.ReactorException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I attempted to configure the active-directory plugin in various ways and saw many failures when clicking the Test button. Eventually I succeeded in a Test by specifying the correct domain name and leaving all the Advanced fields blank. But upon clicking Save, the Oops page came up displaying the following error: org.jvnet.hudson.reactor.ReactorException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) at jenkins.model.Jenkins.executeReactor(Jenkins.java:910) at jenkins.model.Jenkins.<init>(Jenkins.java:806) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$3.run(WebAppMain.java:221) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at hudson.util.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:94) at hudson.util.spring.BeanBuilder.createApplicationContext(BeanBuilder.java:388) at hudson.plugins.active_directory.ActiveDirectorySecurityRealm.createSecurityComponents(ActiveDirectorySecurityRealm.java:131) at hudson.security.SecurityRealm.getSecurityComponents(SecurityRealm.java:398) at hudson.security.HudsonFilter.reset(HudsonFilter.java:134) at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2050) at jenkins.model.Jenkins$20.run(Jenkins.java:2618) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) ... 32 more Caused by: java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty at org.springframework.util.Assert.hasLength(Assert.java:136) at org.springframework.util.Assert.hasLength(Assert.java:148) at org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider.afterPropertiesSet(RememberMeAuthenticationProvider.java:56) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 37 more And now, after restarting Jenkins, it fails to start and displays this same error with no way to get back to my previous configuration (no security configured). Also, there was no option to choose a version other than 'current'. I'm actually running 1.532.1, but didn't see anything related in the change logs, so I haven't tried upgrading to the latest.

    Jenkins JIRA | 3 years ago | Robert Campbell
    org.jvnet.hudson.reactor.ReactorException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager': Cannot create inner bean '(inner bean)' of type [org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider] while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty
  6. 0

    GitHub comment 223#233975713

    GitHub | 5 months ago | fraulyoner
    java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have length; it must not be null or empty

    1 unregistered visitors
    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

      [Assertion failed] - this String argument must have length; it must not be null or empty

      at org.springframework.util.Assert.hasLength()
    2. Spring Core
      Assert.hasLength
      1. org.springframework.util.Assert.hasLength(Assert.java:136)
      2. org.springframework.util.Assert.hasLength(Assert.java:148)
      2 frames
    3. spring-security-ldap
      AbstractLdapAuthenticationProvider.authenticate
      1. org.springframework.security.ldap.userdetails.Person$Essence.createUserDetails(Person.java:129)
      2. org.springframework.security.ldap.userdetails.InetOrgPersonContextMapper.mapUserFromContext(InetOrgPersonContextMapper.java:37)
      3. org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider.authenticate(AbstractLdapAuthenticationProvider.java:63)
      3 frames
    4. spring-security-core
      ProviderManager.authenticate
      1. org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
      1 frame
    5. Spring Security
      UsernamePasswordAuthenticationFilter.attemptAuthentication
      1. org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94)
      1 frame
    6. grails.plugin.springsecurity
      RequestHolderAuthenticationFilter.attemptAuthentication
      1. grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.attemptAuthentication(RequestHolderAuthenticationFilter.java:76)
      1 frame
    7. Spring Security
      AbstractAuthenticationProcessingFilter.doFilter
      1. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211)
      1 frame
    8. grails.plugin.springsecurity
      RequestHolderAuthenticationFilter.doFilter
      1. grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49)
      1 frame
    9. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      1 frame
    10. grails.plugin.springsecurity
      MutableLogoutFilter.doFilter
      1. grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82)
      1 frame
    11. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      4. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      5. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      5 frames
    12. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
      2 frames
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    14. Grails
      GrailsWebRequestFilter.doFilterInternal
      1. org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
      1 frame
    15. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    16. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    17. Grails
      HiddenHttpMethodFilter.doFilterInternal
      1. org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
      1 frame
    18. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    20. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      3. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
      4. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
      4 frames
    21. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      7. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
      8. org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
      10 frames
    22. org.apache.coyote
      AbstractAjpProcessor.process
      1. org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827)
      1 frame
    23. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
      2. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
      3 frames
    24. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    25. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame