org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel]

ZK-Tracker | hawk | 5 years ago
  1. 0

    If 2 auto-wired beans are different types with same variable name, even in different composers, it causes "Injection of autowired dependencies failed;" for example: {code} public class TestZKController extends GenericSpringComposer { @Autowired private Label testLabel; } {code} if there is another testLabel: {code} public class TestZKController2 extends GenericSpringComposer { @Autowired private Textbox testLabel; } {code} The exception will be like: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075) at org.zkoss.spring.init.CoreVariableResolver.resolveVariable(CoreVariableResolver.java:59) at org.zkoss.zkplus.spring.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:99) at org.zkoss.xel.util.Evaluators.resolveVariable(Evaluators.java:192) at org.zkoss.zk.ui.impl.PageImpl.getXelVariable(PageImpl.java:523) at org.zkoss.zk.xel.impl.ExecutionResolver.resolveVariable(ExecutionResolver.java:190) at org.zkforge.apache.commons.el.Resolvers$1.resolve(Resolvers.java:36) at org.zkforge.apache.commons.el.Resolvers.resolve(Resolvers.java:58) at org.zkforge.apache.commons.el.NamedValue.evaluate(NamedValue.java:119) at org.zkforge.apache.commons.el.ExpressionEvaluatorImpl$JSTLExpression.evaluate(ExpressionEvaluatorImpl.java:518) at org.zkoss.xel.el.ELXelExpression.evaluate(ELXelExpression.java:45) at org.zkoss.zk.xel.impl.SimpleEvaluator.evaluate(SimpleEvaluator.java:68) at org.zkoss.zk.xel.ExValue.getValue(ExValue.java:101) at org.zkoss.zk.ui.metainfo.ComponentInfo.toComposers(ComponentInfo.java:365) at org.zkoss.zk.ui.metainfo.ComponentInfo.resolveComposer(ComponentInfo.java:352) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:692) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:686) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:662) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:597) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:383) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:306) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:225) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at org.zkoss.spring.security.ui.ZkLoginOKFilter.doFilter(ZkLoginOKFilter.java:136) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkEnableSessionInvalidateFilter.doFilter(ZkEnableSessionInvalidateFilter.java:64) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkDisableSessionInvalidateFilter.doFilter(ZkDisableSessionInvalidateFilter.java:72) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkError403Filter.doFilter(ZkError403Filter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.config.ZkDesktopReuseFilter.doFilter(ZkDesktopReuseFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 5 years ago | hawk
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel]
  2. 0

    If 2 auto-wired beans are different types with same variable name, even in different composers, it causes "Injection of autowired dependencies failed;" for example: {code} public class TestZKController extends GenericSpringComposer { @Autowired private Label testLabel; } {code} if there is another testLabel: {code} public class TestZKController2 extends GenericSpringComposer { @Autowired private Textbox testLabel; } {code} The exception will be like: {code} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075) at org.zkoss.spring.init.CoreVariableResolver.resolveVariable(CoreVariableResolver.java:59) at org.zkoss.zkplus.spring.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:99) at org.zkoss.xel.util.Evaluators.resolveVariable(Evaluators.java:192) at org.zkoss.zk.ui.impl.PageImpl.getXelVariable(PageImpl.java:523) at org.zkoss.zk.xel.impl.ExecutionResolver.resolveVariable(ExecutionResolver.java:190) at org.zkforge.apache.commons.el.Resolvers$1.resolve(Resolvers.java:36) at org.zkforge.apache.commons.el.Resolvers.resolve(Resolvers.java:58) at org.zkforge.apache.commons.el.NamedValue.evaluate(NamedValue.java:119) at org.zkforge.apache.commons.el.ExpressionEvaluatorImpl$JSTLExpression.evaluate(ExpressionEvaluatorImpl.java:518) at org.zkoss.xel.el.ELXelExpression.evaluate(ELXelExpression.java:45) at org.zkoss.zk.xel.impl.SimpleEvaluator.evaluate(SimpleEvaluator.java:68) at org.zkoss.zk.xel.ExValue.getValue(ExValue.java:101) at org.zkoss.zk.ui.metainfo.ComponentInfo.toComposers(ComponentInfo.java:365) at org.zkoss.zk.ui.metainfo.ComponentInfo.resolveComposer(ComponentInfo.java:352) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:692) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:686) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:662) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:597) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:383) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:306) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:225) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at org.zkoss.spring.security.ui.ZkLoginOKFilter.doFilter(ZkLoginOKFilter.java:136) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkEnableSessionInvalidateFilter.doFilter(ZkEnableSessionInvalidateFilter.java:64) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkDisableSessionInvalidateFilter.doFilter(ZkDisableSessionInvalidateFilter.java:72) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.ui.ZkError403Filter.doFilter(ZkError403Filter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.zkoss.spring.security.config.ZkDesktopReuseFilter.doFilter(ZkDesktopReuseFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 5 years ago | hawk
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel]
  3. 0

    [WG: Sakai QA] Trunk is down

    sakaiproject.org | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.entitybroker.impl.entityprovider.EntityProviderAutoRegistrar' defined in file [/home/tomcat-nightly/sakai-demo-oracle/components/entitybroker-pack/WEB-INF/components.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportDefEntityProvider' defined in class path resource [site-stats-components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.api.report.ReportManager' while setting bean property 'reportManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportManager' defined in class path resource [site-stats-components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.api.StatsManager' while setting bean property 'statsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.StatsManager' defined in class path resource [site-stats-components.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'clusterService' of bean class [org.sakaiproject.sitestats.impl.StatsManagerImpl]: Bean property 'clusterService' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Editor / Upload document does not work

    GitHub | 2 years ago | pvgenuchten
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resource.upload.and.link': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private jeeves.server.context.ServiceContext org.fao.geonet.services.resources.UploadAndProcess.context; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [jeeves.server.context.ServiceContext] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  6. 0

    Got following error in running server "java.lang.NoSuchMethodError: java/lang/Object.toString()Ljava/lang/String;"

    Stack Overflow | 3 years ago | Pathik
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBean5' defined in ServletContext resource [/WEB-INF/v2_0/myApplicationContext.xml]: Cannot resolve reference to bean 'myBean1' while setting bean property 'myProperty3' with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBean1' defined in ServletContext resource [/WEB-INF/myApplicationContext.xml]: Cannot resolve reference to bean 'myBean2' while setting bean property 'myProperty4' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBean2' defined in ServletContext resource [/WEB-INF/myApplicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: java/lang/Object.toString()Ljava/lang/String;
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'testZKCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.zul.Label org.zkoss.zkspringessentials.controller.TestZKController.name; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.zkoss.zul.Label] is defined: expected single matching bean but found 4: [someLbl, lastRanLbl, myLbl, testLabel]

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    6 frames
  3. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
    1 frame
  4. org.zkoss.spring
    CoreVariableResolver.resolveVariable
    1. org.zkoss.spring.init.CoreVariableResolver.resolveVariable(CoreVariableResolver.java:59)
    1 frame
  5. org.zkoss.zkplus
    DelegatingVariableResolver.resolveVariable
    1. org.zkoss.zkplus.spring.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:99)
    1 frame
  6. The ZKoss Common Library
    Evaluators.resolveVariable
    1. org.zkoss.xel.util.Evaluators.resolveVariable(Evaluators.java:192)
    1 frame
  7. ZK Kernel
    ExecutionResolver.resolveVariable
    1. org.zkoss.zk.ui.impl.PageImpl.getXelVariable(PageImpl.java:523)
    2. org.zkoss.zk.xel.impl.ExecutionResolver.resolveVariable(ExecutionResolver.java:190)
    2 frames
  8. ZK Commons EL
    ExpressionEvaluatorImpl$JSTLExpression.evaluate
    1. org.zkforge.apache.commons.el.Resolvers$1.resolve(Resolvers.java:36)
    2. org.zkforge.apache.commons.el.Resolvers.resolve(Resolvers.java:58)
    3. org.zkforge.apache.commons.el.NamedValue.evaluate(NamedValue.java:119)
    4. org.zkforge.apache.commons.el.ExpressionEvaluatorImpl$JSTLExpression.evaluate(ExpressionEvaluatorImpl.java:518)
    4 frames
  9. The ZKoss Common Library
    ELXelExpression.evaluate
    1. org.zkoss.xel.el.ELXelExpression.evaluate(ELXelExpression.java:45)
    1 frame
  10. ZK Kernel
    DHtmlLayoutServlet.doGet
    1. org.zkoss.zk.xel.impl.SimpleEvaluator.evaluate(SimpleEvaluator.java:68)
    2. org.zkoss.zk.xel.ExValue.getValue(ExValue.java:101)
    3. org.zkoss.zk.ui.metainfo.ComponentInfo.toComposers(ComponentInfo.java:365)
    4. org.zkoss.zk.ui.metainfo.ComponentInfo.resolveComposer(ComponentInfo.java:352)
    5. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:692)
    6. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:686)
    7. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630)
    8. org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:662)
    9. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:630)
    10. org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:597)
    11. org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:383)
    12. org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:306)
    13. org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:225)
    14. org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146)
    14 frames
  11. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    2 frames
  12. Jetty Server
    ServletHandler$CachedChain.doFilter
    1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
    2 frames
  13. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
    1 frame
  14. org.zkoss.spring
    ZkLoginOKFilter.doFilter
    1. org.zkoss.spring.security.ui.ZkLoginOKFilter.doFilter(ZkLoginOKFilter.java:136)
    1 frame
  15. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    4 frames
  16. org.zkoss.spring
    ZkEnableSessionInvalidateFilter.doFilter
    1. org.zkoss.spring.security.ui.ZkEnableSessionInvalidateFilter.doFilter(ZkEnableSessionInvalidateFilter.java:64)
    1 frame
  17. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    2. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
    3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    4. org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
    5. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    6. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    7. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    8. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    9. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    10. org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
    11. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    12. org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
    13. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    14. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    15. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    15 frames
  18. org.zkoss.spring
    ZkDisableSessionInvalidateFilter.doFilter
    1. org.zkoss.spring.security.ui.ZkDisableSessionInvalidateFilter.doFilter(ZkDisableSessionInvalidateFilter.java:72)
    1 frame
  19. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    1 frame
  20. org.zkoss.spring
    ZkError403Filter.doFilter
    1. org.zkoss.spring.security.ui.ZkError403Filter.doFilter(ZkError403Filter.java:87)
    1 frame
  21. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    2. org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    4. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    5. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    5 frames
  22. org.zkoss.spring
    ZkDesktopReuseFilter.doFilter
    1. org.zkoss.spring.security.config.ZkDesktopReuseFilter.doFilter(ZkDesktopReuseFilter.java:119)
    1 frame
  23. Spring Security
    FilterChainProxy.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    2. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    2 frames
  24. Spring
    DelegatingFilterProxy.doFilter
    1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    2 frames
  25. Jetty Server
    SelectChannelEndPoint.run
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
    2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
    3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
    7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    8. org.mortbay.jetty.Server.handle(Server.java:326)
    9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    10. org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
    11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    14 frames
  26. Jetty Util
    QueuedThreadPool$PoolThread.run
    1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
    1 frame