facebook

Spring: validation of inherited properties fails

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #257540 Reply

    brbrr
    Member

    If you have bean definition with a class “A” that has a superclass “S” and a property defined in “S” – spring validation reports problems in definition saying that class “A” doesn’t have this property
    —————————————————————————–
    No setter found for property ‘accountingProcessor’ in class ‘com.b2bits.pnc.portal.accounting.command.BatchMarketingCommand’ PNC/etc/spring-beans accounting-beans.xml line 43 1156421963233 24648
    —————————————————————————–

    MyEclipse Enterprise Workbench
    Version: 5.0.1 GA
    Build id: 20060810-5.0.1-GA
    Eclipse 3.2

    #257596 Reply

    Riyad Kalla
    Member

    I cannot reproduce this, this is how I did it:

    1) Create new web project
    2) Create a class, BaseBean (defines 2 string properties)
    3) Create a class ExtensionBean that extends BaseBean (defines 2 more spring properties)
    4) Use the Spring View to add a new bean of type ExtensionBean, go to Properties and hit “Load Class Properties” , all 4 properties are loaded, hit Finish
    5) New entry created as follows:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
        <bean id="ExtensionBean" class="com.test.ExtensionBean"
            abstract="false" singleton="true" lazy-init="default"
            autowire="default" dependency-check="default">
            <property name="password">
                <null />
            </property>
            <property name="name">
                <null />
            </property>
            <property name="firstName">
                <null />
            </property>
            <property name="lastName">
                <null />
            </property>
        </bean>
    </beans>
    

    And no validation errors… can you try that on your end, or tell me how ot reproduce what you are seeing?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Spring: validation of inherited properties fails

You must be logged in to post in the forum log in