You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Rohan Emmanuel <ro...@gmail.com> on 2022/10/06 19:50:06 UTC

Ignore Unkown properties of beans in applicationContext.xml

Hi,
I am defining some beans in the xml file . The beans has some properties
which are known and some are unknown. For the known properties, i do have
setters/getters. While loading the xml file, the camel startup is being
stopped with an error message as an invalid setter method.
is there a way where I can set it to ignore unknown properties?


*Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'xyz' of bean class [com.hpe.nonstop.ddl.JavaToDdlProcessor]: Bean
property 'xyz' 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.BeanWrapperImpl.createNotWritablePropertyException(BeanWrapperImpl.java:243)
at
org.springframework.beans.AbstractNestablePropertyAccessor.processLocalProperty(AbstractNestablePropertyAccessor.java:430)
at
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:278)

-- 
Regards,
Rohan Emmanuel

Re: Ignore Unkown properties of beans in applicationContext.xml

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

This is a spring framework question as the <bean> is done by spring and not
Camel, when you use spring xml files.
I am not aware of any options spring has to ignore.

On Thu, Oct 6, 2022 at 2:50 PM Rohan Emmanuel <ro...@gmail.com>
wrote:

> Hi,
> I am defining some beans in the xml file . The beans has some properties
> which are known and some are unknown. For the known properties, i do have
> setters/getters. While loading the xml file, the camel startup is being
> stopped with an error message as an invalid setter method.
> is there a way where I can set it to ignore unknown properties?
>
>
> *Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
> property 'xyz' of bean class [com.hpe.nonstop.ddl.JavaToDdlProcessor]: Bean
> property 'xyz' 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.BeanWrapperImpl.createNotWritablePropertyException(BeanWrapperImpl.java:243)
> at
>
> org.springframework.beans.AbstractNestablePropertyAccessor.processLocalProperty(AbstractNestablePropertyAccessor.java:430)
> at
>
> org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:278)
>
> --
> Regards,
> Rohan Emmanuel
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2