-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I tied example from Using Custom ZK Scopes For Spring Beans but without success.
By default this example is not working. I get exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopesCtrl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.zkoss.springessentials.beans.SimpleMessageBean org.zkoss.springessentials.controller.ScopesController.msgBean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.zkoss.springessentials.beans.SimpleMessageBean] 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)}
<listener> <listener-class>org.zkoss.spring.web.context.CoreContextListener</listener-class> </listener>
I added this listener but when I run application that I get following exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.msgBean' defined in class path resource [org/zkoss/spring/beans/zkcomponents/ZKComponentBeanMethods.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.zkoss.springessentials.beans.SimpleMessageBean org.zkoss.spring.beans.zkcomponents.ZKComponentBeanMethods.m1()] threw exception; nested exception is java.lang.RuntimeException: Fellow component not found: msgBean
Hi
I have reproduced this case.
Asked: 2011-05-03 16:37:59 +0800
Seen: 653 times
Last updated: Nov 28 '11