i dont get it, do you have two different SystemManagerService objects?

this doesnt make sense

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named
'SystemManagerService' must be of type [xx.SystemManagerService], but was
actually of type [xx.SystemManagerService]

-igor



On 1/7/07, tooy li(Gmail) <[EMAIL PROTECTED]> wrote:

I use spring to find some dao service in system. it can work well. but in
some situation, some strange things happen.

MyPage
@SpringBean(id="systemservice")
SystemManagerService systemservice;

so, when i new one MyPage object, or create it in ut environment, i can
get the right bean.
but when i use the class of MyPage to create the object.  error happens.

for example "setResponsePage(MyPage.class);" to get the below error

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean
named 'SystemManagerService' must be of type [xx.SystemManagerService],
but was actually of type [xx.SystemManagerService]     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:308)     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:160)     at
org.springframework.context.support.AbstractApplicationContext.getBean(
AbstractApplicationContext.java:644)     at
wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:229)
at wicket.spring.SpringBeanLocator.locateProxyTarget(
SpringBeanLocator.java:126)for "setResponsePage(new MyPage);" , it's ok.Itrace 
the code , and find the spring return a proxy in this situation but
when i use class method in ut context, it's okpublic void
testListDictKindPage() {  WicketTester test =
WicketTestHelper.createSpringContextWicketTester();  test.startPage(MyPage
.class);  test.assertRenderedPage(MyPage.class); }and, I also use the
class method in the other page, all of them are ok. so, I'm
puzzle.SystemManagerService object don't use generic, its some properties
use it.  is there anyone can help me?
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to