Failed to convert property value of type 'java.lang.String' to required type

Asked on April 11, 2013
Hi I am new to spring and getting below exception.
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'com.test.Company' for property 'company'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.test.Company] for property 'company': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:485)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365)

Replied on April 11, 2013
Tom,
It looks that you have a class Company. And you want to inject company object but you are giving string value. Check whether you are providing correct value to Company data type.
It looks that you have a class Company. And you want to inject company object but you are giving string value. Check whether you are providing correct value to Company data type.