tomhay
Sep 19th, 2004, 06:52 AM
I've installed the Spring IDE plugin for eclipse. I'm trying a mickey mouse project to get the hang of it. My Java classes compile OK, but the validator complains about my spring.xml config file:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean class="eg.Appendix" id="app">
<property name="word"><value>World</value></property>
</bean>
<bean class="eg.First" id="first">
<property name="append"><ref bean="app" /></property>
</bean>
</beans>
The error is "No setter for property 'word' defined in class 'eg.First'".
I'm baffled, because 'word' is a property of eg.Appendix, not eg.First. Despite the validation error, the application executes as expected - output as follows:
19-Sep-2004 10:50:55 org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from (no description)
19-Sep-2004 10:50:55 org.springframework.beans.factory.support.Abstract BeanFactory getBean
INFO: Creating shared instance of singleton bean 'first'
19-Sep-2004 10:50:56 org.springframework.beans.factory.support.Abstract BeanFactory getBean
INFO: Creating shared instance of singleton bean 'app'
Hello World
Possibly because of the validation error, I can't get a graphical view of the config - I just get a blank sheet in the Config File viewer.
Any help gratefully received !
Tom.
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean class="eg.Appendix" id="app">
<property name="word"><value>World</value></property>
</bean>
<bean class="eg.First" id="first">
<property name="append"><ref bean="app" /></property>
</bean>
</beans>
The error is "No setter for property 'word' defined in class 'eg.First'".
I'm baffled, because 'word' is a property of eg.Appendix, not eg.First. Despite the validation error, the application executes as expected - output as follows:
19-Sep-2004 10:50:55 org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from (no description)
19-Sep-2004 10:50:55 org.springframework.beans.factory.support.Abstract BeanFactory getBean
INFO: Creating shared instance of singleton bean 'first'
19-Sep-2004 10:50:56 org.springframework.beans.factory.support.Abstract BeanFactory getBean
INFO: Creating shared instance of singleton bean 'app'
Hello World
Possibly because of the validation error, I can't get a graphical view of the config - I just get a blank sheet in the Config File viewer.
Any help gratefully received !
Tom.