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]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via Stack Overflow by Al Sweetman

Check Servers Launch Configuration in Eclipse. See the details below.

,
via playframework.com by Unknown author

Add guice to the dependencies.

libraryDependencies += guice

Solutions on the web

via ZK-Tracker by hawk, 1 year ago
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]
via ZK-Tracker by hawk, 1 year ago
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]
via chinabtp.com by Unknown author, 2 years ago
Error creating bean with name 'bookController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cz.ryska.dipapp.service.BookService
via Stack Overflow by Ondřej Ryška
, 2 years ago
Error creating bean with name 'bookService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cz.ryska.dipapp.dao.BookDao
via Stack Overflow by vipin
, 1 year ago
Error creating bean with name 'employeeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.demo.dao.employeeDao
via Stack Overflow by vipin
, 2 years ago
Error creating bean with name 'employeeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.demo.dao.employeeDao
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.zkoss.spring.init.CoreVariableResolver.resolveVariable(CoreVariableResolver.java:59)
at org.zkoss.zkplus.spring.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:99)
at org.zkoss.zk.ui.impl.PageImpl.getXelVariable(PageImpl.java:523)
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.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.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.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.zkoss.spring.security.ui.ZkDisableSessionInvalidateFilter.doFilter(ZkDisableSessionInvalidateFilter.java:72)
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.zkoss.spring.security.config.ZkDesktopReuseFilter.doFilter(ZkDesktopReuseFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
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)

Users with the same issue

Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.