Home  >  Forum  >  Spring
Post New Query

Error creating bean with name messageSource


joined on
August 15,2013
Asked on August 15,2013
        Error creating bean with name messageSource defined in class path resource spring.xml: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property prop of bean class org.springframework.context.support.ResourceBundleMessageSource: Bean property prop is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)

joined on
August 15,2013
Replied on August 15,2013

I am not sure what I changed and my app is not working
joined on
March 18,2013
Replied on August 15,2013

Error says that Spring is unable to find the bean property as prop , post your the code of XML

joined on
August 15,2013
Replied on August 15,2013

<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
 <property name="prop">
   <list>
     <value>dbprop</value>
   </list>
 </property>
joined on
March 18,2013
Replied on August 15,2013

prop should be basenames, run and check

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us