0 Replies - 583 Views - Last Post: 20 March 2017 - 05:24 PM

#1 zapp1  Icon User is offline

  • D.I.C Head

Reputation: -3
  • View blog
  • Posts: 69
  • Joined: 07-December 16

Spring MVC (Tomcat) do not recognize new properties of the class-maper

Posted 20 March 2017 - 05:24 PM

I do project in Ecclipse (Spring MVC) that has some MVC form template as a basis ( including the Student class with id, age, name properties with get and set methods).
As the whole project is based on another "MVC"-like project I started to do View (jsp page) that is rendered
normally, but when such elements as <form:radiobutton path="", <form:input ... etc has empty path attribute.
Indeed in Spring MVC I need fill the path= attribute with some reference to properties of the class, so mapping to initial id, age, name properties is fine, indeed when I added new properties (subject, yearof study) with set-get methods to Student class and referenced it in path=subject, f.e. in <form:input I got such error:
HTTP Status 500 - 
 - description: The server encountered an internal error () that prevented it from fulfilling this request.-

..Some error on the line 23 in <form:input path=subject ..

exception - org.apache.jasper.JasperException: org.springframework.beans.NotReadablePropertyException: Invalid property 'subject' of bean class [tp.Student]: Bean property 'subject' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
Root cause: NotReadablePropertyException 
....
--No changes in setter-getters, and by creating any new properties do not help -- no one is recognized by server.
--Meanwhile even I delete AGE property from Student class I can further to reference it in path=age,
incomparably to any new properties that induce the above error.
I can suppose that during compilation and running -- Tomcat or Ecclipse refers to some initial class
with just 3 properties and just them could be used in path= attribute (So no modifications of Student class do not change the path behaviour. For instance no chages of class name, or even creation of new Student,java file do not help.).
Could I clean logs of server of Ecclipse IDE? What internal error it could be, what provoke such blocking or invisibility?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1