Hi
I have a very urgent need to get the follwing bug fixed. Can you please help with the following?
I have an XML config file which I pull in my application context, the
XML bean entry is given below for reference. I have a java class
TestConfig which sets the lists and gets the lists as defined in te config. file. As always the framework should go away and set the list for as per
the definitions in the XML config file. Unfortunately spring has been unable to accept the defintion of the lists I've given. Please advise if my config XML is incorrect or if my class is not doing the setting/getting correctly.
The entries for the class are given below as well.
When I run my app I get the error below please help what am I doibg wrong!
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'TestConfig' defined in class path resource [beans-service-test.xml]: Can't resolve reference to bean 'CVB' while setting property 'convBonds[0]'; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'CVB' is defined: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [instrumentDao,oracleDataSource,hibernateSessionFac tory,TestConfig]; Root of BeanFactory hierarchy
XML File entries
------------------
<bean id="TestConfig" class="com.services.testConfiguration">
</property>
<property name="convBonds">
<list>
<ref bean="CVB"/>
<ref bean="CVP"/>
</list>
</property>
<property name="altIds">
<list>
<ref bean="MC"/>
<ref bean="SE"/>
<ref bean="IS"/>
<ref bean="RC"/>
</list>
</property>
</bean>
</beans>
TestConfig Class
--------------------
/** Sets the convBonds
* @param BigDecimal convBonds
*/
public final void setconvBonds(final List convlist) {
convBonds = convlist;
}
/** Sets the altIds
* @param BigDecimal altIds
*/
public final void setaltIds(final List altlist) {
altIds = altlist;
}
/**
* List of Bonds.
*/
private List convBonds;
/**
* List of alt ids.
*/
private List altIds;
/** convBonds;
*
* @return convBonds;;
*/
public final List convBonds() {
return convBonds;
}
/**
* altIds
* @return altIds;
*/
public final List altIds() {
return altIds;
}
![]()
![]()


Reply With Quote
I'll try it out over the weekend and give you some feedback (least I can do for your kind assistence).