Hi,igor
I make sure there is only one class named this. I also change the name of class 
to find something, but get nothing. it's very strange.

I put a bean named 'SystemManagerService'  in spring context . and i also can 
work well to find it. It's only happen when i create the page by page class in 
wicket.

I read something about java generics.  some time jvm can make castexception or 
cannot identiefied the class when you don't use generic right. but I think it's 
not the situation.


> Message: 2
> Date: Sun, 7 Jan 2007 06:40:34 -0800
> From: "Igor Vaynberg" <[EMAIL PROTECTED]>
> Subject: Re: [Wicket-user] Strange problem, very puzzle for spring in
> wicket 2.0
> To: [email protected]
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://sourceforge.net/mailarchive/forum.php?forum=wicket-user/attachments/20070107/e8e8d425/attachment.html
>  
> 
> ------------------------------
> 
> Message: 3
> Date: Sun, 7 Jan 2007 06:46:22 -0800
> From: "Igor Vaynberg" <[EMAIL PROTECTED]>
> Subject: Re: [Wicket-user] Wicket2 and Wicket 1.2.x
> To: [email protected]
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> On 1/7/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote:
>>
>> I like 2.0 and use it on my own, but also faced more than 1 time trouble
>> with it - this is ok if its a "hobby" like it is for me but may be a
>> problem
>> when you develop something "real"...
> 
> 
> i know of quiet a few people, including myself, that are developing
> something real with 2.0. you have to remember the stateless stuff is not the
> main focus of wicket, and so most of our users will never use it.
> 
> -igor
> 
> 
> 
> 
> Regards
>>
>>
>>
>> -------------------------------------------------------------------------
>> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://sourceforge.net/mailarchive/forum.php?forum=wicket-user/attachments/20070107/8633c242/attachment.html
>  
> 
> ------------------------------
> 
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> End of Wicket-user Digest, Vol 8, Issue 38
> ******************************************
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to