Announcement Announcement Module
No announcement yet.
org.springframework.beans.InvalidPropertyException Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.beans.InvalidPropertyException

    I am really new to Spring MVC. I am trying to bind a arrayList of to a command on my form and I am getting an org.springframework.beans.InvalidPropertyException .

    here is my command object. The array List is later populated with ProjectCategoryBean-s:
    class ProjectCategoryCommand {
    private List projectCategories = new ArrayList ();
    ... getter and setters

    class ProjectCategoryBean {
    private Integer categoryId;
    private Integer subcategoryId;
    private String categoryName;
    private String subcategoryName;
    -- with getter and setters


    I am using a SpimpleFormController and can repopulate my command as needed without any trouble in the formBackingObject method of the controller. My trouble starts when I try to submit my changes to the controller. I get the error: org.springframework.beans.InvalidPropertyException : Invalid property 'projectCategories[15]' of bean class [ProjectCategoryCommand]: Index of out of bounds in property path 'projectCategories[15]'; nested exception is java.lang.IndexOutOfBoundsException: Index: 15, Size: 15
    org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(

    Can anyone help me with this please. I have searched the web section and still have not understood what to do.