java.lang.IllegalArgumentException: 'name' must not be null

tip

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • In CONFIG mode, you need to choose a contentService: (currently) 'HTTP (Web-based document)' or 'File in the portlet's classpath' If you forget to choose one, the config doesn't complain and you get this error... WARN [uP-PortletExec-27-admin-RENDER-[WebProxyPortlet]] o.s.web.portlet.DispatcherPortlet 2015-08-11 08:50:55,653 - Handler execution resulted in exception - forwarding to resolved error view java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112) ~[spring-core-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1078) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:236) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:962) ~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.jasig.portlet.proxy.mvc.portlet.proxy.ProxyPortletController.showContent(ProxyPortletController.java:102) ~[ProxyPortletController.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177) ~[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:369) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:356) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:296) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:768) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:536) [spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:483) [spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at javax.portlet.GenericPortlet.render(GenericPortlet.java:248) [portlet-api.jar:na] at org.jasig.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:183) [FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:99) [FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:110) [FilterManagerImpl.class:na] at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340) [pluto-container-driver-api.jar:2.1.0-M3] at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261) [pluto-container-driver-api.jar:2.1.0-M3] at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) [servlet-api.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543) [catalina.jar:7.0.54] at org.apache.pluto.driver.container.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:233) [pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at org.apache.pluto.driver.container.DefaultPortletInvokerService.render(DefaultPortletInvokerService.java:117) [pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.jasig.portal.portlet.dao.jpa.ThreadContextClassLoaderAspect.doThreadContextClassLoaderUpdate(ThreadContextClassLoaderAspect.java:69) [ThreadContextClassLoaderAspect.class:na] at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at com.sun.proxy.$Proxy369.render(Unknown Source) [na:na] at org.apache.pluto.container.impl.PortletContainerImpl.doRender(PortletContainerImpl.java:157) [pluto-container-2.1.0-M3.jar:2.1.0-M3] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRender(PortletRendererImpl.java:405) [PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRenderMarkup(PortletRendererImpl.java:238) [PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:64) [PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:41) [PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$1.call(PortletExecutionWorker.java:135) [PortletExecutionWorker$1.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$ExecutionLifecycleCallable.call(PortletExecutionWorker.java:175) [PortletExecutionWorker$ExecutionLifecycleCallable.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionCallable.call(PortletExecutionCallable.java:118) [PortletExecutionCallable.class:na] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
    via by Drew Wills,
  • In CONFIG mode, you need to choose a contentService: (currently) 'HTTP (Web-based document)' or 'File in the portlet's classpath' If you forget to choose one, the config doesn't complain and you get this error... WARN [uP-PortletExec-27-admin-RENDER-[WebProxyPortlet]] o.s.web.portlet.DispatcherPortlet 2015-08-11 08:50:55,653 - Handler execution resulted in exception - forwarding to resolved error view java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112) ~[spring-core-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1078) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:236) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:962) ~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.jasig.portlet.proxy.mvc.portlet.proxy.ProxyPortletController.showContent(ProxyPortletController.java:102) ~[ProxyPortletController.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177) ~[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:369) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:356) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:296) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:768) ~[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:536) [spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:483) [spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at javax.portlet.GenericPortlet.render(GenericPortlet.java:248) [portlet-api.jar:na] at org.jasig.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:183) [FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:99) [FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:110) [FilterManagerImpl.class:na] at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340) [pluto-container-driver-api.jar:2.1.0-M3] at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261) [pluto-container-driver-api.jar:2.1.0-M3] at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) [servlet-api.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604) [catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543) [catalina.jar:7.0.54] at org.apache.pluto.driver.container.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:233) [pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at org.apache.pluto.driver.container.DefaultPortletInvokerService.render(DefaultPortletInvokerService.java:117) [pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.jasig.portal.portlet.dao.jpa.ThreadContextClassLoaderAspect.doThreadContextClassLoaderUpdate(ThreadContextClassLoaderAspect.java:69) [ThreadContextClassLoaderAspect.class:na] at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at com.sun.proxy.$Proxy369.render(Unknown Source) [na:na] at org.apache.pluto.container.impl.PortletContainerImpl.doRender(PortletContainerImpl.java:157) [pluto-container-2.1.0-M3.jar:2.1.0-M3] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRender(PortletRendererImpl.java:405) [PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRenderMarkup(PortletRendererImpl.java:238) [PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:64) [PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:41) [PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$1.call(PortletExecutionWorker.java:135) [PortletExecutionWorker$1.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$ExecutionLifecycleCallable.call(PortletExecutionWorker.java:175) [PortletExecutionWorker$ExecutionLifecycleCallable.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionCallable.call(PortletExecutionCallable.java:118) [PortletExecutionCallable.class:na] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
    via by Drew Wills,
  • When using Spring Security with BeanNameAutoProxyCreator the following error is produced because the beanName passed in by AutowireBeanFactoryObjectPostProcessor is null. {code} SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 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.IllegalArgumentException: 'name' must not be null at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1025) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: 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.IllegalArgumentException: 'name' must not be null at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) ... 23 more Caused by: java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72) at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1018) at org.springframework.beans.factory.support.AbstractBeanFactory.getAliases(AbstractBeanFactory.java:602) at org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator.getAdvicesAndAdvisorsForBean(BeanNameAutoProxyCreator.java:90) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:388) at org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor.postProcess(AutowireBeanFactoryObjectPostProcessor.java:56) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:141) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:247) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:49) at intouchapp.config.SecurityConfig$$EnhancerByCGLIB$$7c2e17f3.init(<generated>) at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:352) at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:305) at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:40) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:85) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da.CGLIB$springSecurityFilterChain$0(<generated>) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da$$FastClassByCGLIB$$841a1210.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:286) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da.springSecurityFilterChain(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160) ... 24 more {code}
    via by Rob Winch,
  • When using Spring Security with BeanNameAutoProxyCreator the following error is produced because the beanName passed in by AutowireBeanFactoryObjectPostProcessor is null. {code} SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 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.IllegalArgumentException: 'name' must not be null at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1025) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: 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.IllegalArgumentException: 'name' must not be null at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) ... 23 more Caused by: java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72) at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1018) at org.springframework.beans.factory.support.AbstractBeanFactory.getAliases(AbstractBeanFactory.java:602) at org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator.getAdvicesAndAdvisorsForBean(BeanNameAutoProxyCreator.java:90) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:388) at org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor.postProcess(AutowireBeanFactoryObjectPostProcessor.java:56) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:141) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:247) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:49) at intouchapp.config.SecurityConfig$$EnhancerByCGLIB$$7c2e17f3.init(<generated>) at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:352) at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:305) at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:40) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:85) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da.CGLIB$springSecurityFilterChain$0(<generated>) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da$$FastClassByCGLIB$$841a1210.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:286) at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerByCGLIB$$4da93da.springSecurityFilterChain(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160) ... 24 more {code}
    via by Rob Winch,
    • java.lang.IllegalArgumentException: 'name' must not be null at org.springframework.util.Assert.notNull(Assert.java:112)[spring-core-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.BeanFactoryUtils.transformedBeanName(BeanFactoryUtils.java:72)[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:1078)[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:236)[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:962)[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.jasig.portlet.proxy.mvc.portlet.proxy.ProxyPortletController.showContent(ProxyPortletController.java:102)[ProxyPortletController.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_60] at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:369)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:356)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:296)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:768)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:536)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:483)[spring-webmvc-portlet-4.1.4.RELEASE.jar:4.1.4.RELEASE] at javax.portlet.GenericPortlet.render(GenericPortlet.java:248)[portlet-api.jar:na] at org.jasig.portal.portlet.container.FilterChainImpl.doFilter(FilterChainImpl.java:183)[FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterChainImpl.processFilter(FilterChainImpl.java:99)[FilterChainImpl.class:na] at org.jasig.portal.portlet.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:110)[FilterManagerImpl.class:na] at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340)[pluto-container-driver-api.jar:2.1.0-M3] at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261)[pluto-container-driver-api.jar:2.1.0-M3] at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)[servlet-api.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)[servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)[catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)[catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)[catalina.jar:7.0.54] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)[catalina.jar:7.0.54] at org.apache.pluto.driver.container.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:233)[pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at org.apache.pluto.driver.container.DefaultPortletInvokerService.render(DefaultPortletInvokerService.java:117)[pluto-portal-driver-2.1.0-M3.jar:2.1.0-M3] at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.jasig.portal.portlet.dao.jpa.ThreadContextClassLoaderAspect.doThreadContextClassLoaderUpdate(ThreadContextClassLoaderAspect.java:69)[ThreadContextClassLoaderAspect.class:na] at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_60] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_60] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)[spring-aop-3.2.9.RELEASE.jar:3.2.9.RELEASE] at com.sun.proxy.$Proxy369.render(Unknown Source)[na:na] at org.apache.pluto.container.impl.PortletContainerImpl.doRender(PortletContainerImpl.java:157)[pluto-container-2.1.0-M3.jar:2.1.0-M3] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRender(PortletRendererImpl.java:405)[PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.PortletRendererImpl.doRenderMarkup(PortletRendererImpl.java:238)[PortletRendererImpl.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:64)[PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletRenderExecutionWorker.callInternal(PortletRenderExecutionWorker.java:41)[PortletRenderExecutionWorker.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$1.call(PortletExecutionWorker.java:135)[PortletExecutionWorker$1.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionWorker$ExecutionLifecycleCallable.call(PortletExecutionWorker.java:175)[PortletExecutionWorker$ExecutionLifecycleCallable.class:na] at org.jasig.portal.portlet.rendering.worker.PortletExecutionCallable.call(PortletExecutionCallable.java:118)[PortletExecutionCallable.class:na] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_60] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_60]

    Users with the same issue

    Unknown visitor1 times, last one,
    osvzs
    osvzs2 times, last one,
    odd
    odd2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    189 more bugmates