Announcement Announcement Module
Collapse
No announcement yet.
error while using validator - NotWritablePropertyExcep Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • error while using validator - NotWritablePropertyExcep

    Following is the validatior I am using :

    <bean id="validator"
    class="org.springframework.batch.item.validator.Sp ringValidator">
    <property name="billingTransactionId">
    <bean id="luhnValidator" class="org.springmodules.validation.valang.ValangV alidator">
    <property name="valang">
    <value>
    <![CDATA[{ billingTransactionId : ? < 33 : 'billingTransactionId field must be a grater that 33 number' } ]]>
    </value>
    </property>
    </bean>
    </property>
    </bean>


    I am getting error :
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'compositeItemProcessor' defined in class path resource [MedJobValidation.xml]: Cannot resolve reference to bean 'validatingItemProcessor' while setting bean property 'itemProcessors' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'validatingItemProcessor' defined in class path resource [MedJobValidation.xml]: Cannot resolve reference to bean 'validator' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'validator' defined in class path resource [MedJobValidation.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'billingTransactionId' of bean class [org.springframework.batch.item.validator.SpringVal idator]: Bean property 'billingTransactionId' 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.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)


    What is causing the error ?

  • #2
    The error your highlighted says it all: you are trying to set a property on a bean that doesn't exist:

    Code:
    <property name="billingTransactionId">

    Comment


    • #3
      Thanks

      Thank You for your reply

      Comment

      Working...
      X