ZK Scopes For Spring Beans

asked 2011-05-03 16:37:59 +0800

mkrajcir gravatar image mkrajcir


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)}

I think that in example is missing following:

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

What is wrong in above mentioned example?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-11-28 09:43:59 +0800

matthewgo gravatar image matthewgo

updated 2011-11-28 09:44:13 +0800

I have reproduced this case.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-05-03 16:37:59 +0800

Seen: 653 times

Last updated: Nov 28 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More