Hi,
I got a class XmlDAo that implement IPersonDAO ok ?
I got another class that recevied a IPersonDAO as a an argument, at buildCode:public class XmlDao implements IPersonDAO
So i wrote this in my config.xml file :Code:public PhoneBookImpl(IPersonDAO dao)
But at runtime, i have this error :Code:<bean id="phoneBook" class="com.ao.springframework.webflow.samples.phonebook.doa.PhoneBookImpl"> <constructor-arg><ref bean="XmlDao"/></constructor-arg> </bean>
XmlDao implements IPersonDAO so it should work, shouldn't it ?Error creating bean with name 'phoneBook' defined in class path resource
[org/springframework/webflow/samples/phonebook/deploy/service-layer.xml]:
1 constructor arguments specified but no matching constructor found in bean 'phoneBook' (hint: specify index arguments for simple parameters to avoid type ambiguities)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:312)
Did I miss something, somewhere ?


Reply With Quote